File tree Expand file tree Collapse file tree 2 files changed +2
-13
lines changed
packages/bento-design-system/src/Illustrations Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change 1
1
export type IllustrationProps = {
2
- size : 24 | 32 | 40 | 80 | 160 ;
2
+ size : 24 | 32 | 40 | 80 | 160 | number ;
3
3
} & (
4
4
| {
5
5
style : "color" ;
Original file line number Diff line number Diff line change @@ -22,16 +22,5 @@ function outlineColor(color: (IllustrationProps & { style: "outline" })["color"]
22
22
}
23
23
24
24
function sizeToDimensions ( size : IllustrationProps [ "size" ] ) : { width : number ; height : number } {
25
- switch ( size ) {
26
- case 24 :
27
- return { width : 24 , height : 24 } ;
28
- case 32 :
29
- return { width : 32 , height : 32 } ;
30
- case 40 :
31
- return { width : 40 , height : 40 } ;
32
- case 80 :
33
- return { width : 80 , height : 80 } ;
34
- case 160 :
35
- return { width : 160 , height : 160 } ;
36
- }
25
+ return { width : size , height : size } ;
37
26
}
You can’t perform that action at this time.
0 commit comments