Skip to content

Commit

Permalink
Fixed types and added missing radius
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaakko Heusala committed Jan 23, 2024
1 parent 206d686 commit fc4c994
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion entities/border/BorderEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,12 @@ export class BorderEntity
const width = this.getWidth();
const color = this.getColor();
const style = this.getStyle();
const radius = this.getRadius();
return {
border: `${ width ? width.getCssStyles() : '0' } ${
style
}${ color ? ' ' + color.getCssStyles() : '' }`
}${ color ? ' ' + color.getCssStyles() : '' }`,
...(radius ? { borderRadius : radius.getCssStyles() } : {}),
};
}

Expand Down
3 changes: 2 additions & 1 deletion entities/style/StyleDTO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { BackgroundDTO } from "../background/BackgroundDTO";
import { BorderDTO } from "../border/BorderDTO";
import { BorderBoxDTO } from "../borderBox/BorderBoxDTO";
import { ColorDTO } from "../color/ColorDTO";
import { FontDTO } from "../font/FontDTO";
import { SizeBoxDTO } from "../sizeBox/SizeBoxDTO";
Expand All @@ -18,7 +19,7 @@ export interface StyleDTO extends DTO {
readonly height ?: SizeDTO;
readonly margin ?: SizeDTO | SizeBoxDTO;
readonly padding ?: SizeDTO | SizeBoxDTO;
readonly border ?: BorderDTO | [BorderDTO, BorderDTO] | [BorderDTO, BorderDTO, BorderDTO, BorderDTO];
readonly border ?: BorderDTO | BorderBoxDTO;
readonly font ?: FontDTO;
readonly textDecoration ?: TextDecorationDTO;
readonly background ?: BackgroundDTO;
Expand Down

0 comments on commit fc4c994

Please sign in to comment.