File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,15 +12,16 @@ export interface TruncateBoxProps extends BaseProps {
1212
1313const getSize = ( size : Size ) =>
1414 matchSize (
15- {
16- 0 : 7.8 ,
17- 1 : 10 ,
18- 2 : 23 ,
19- 3 : 35 ,
20- 4 : 45 ,
21- 5 : 55 ,
22- } ,
23- size
15+ {
16+ 0 : 7.8 ,
17+ 1 : 10 ,
18+ 1.6 : 16 ,
19+ 2 : 23 ,
20+ 3 : 35 ,
21+ 4 : 45 ,
22+ 5 : 55 ,
23+ } ,
24+ size ,
2425 ) ;
2526
2627const StyledTruncateBox = styled ( 'div' ) < TruncateBoxProps > (
@@ -36,18 +37,20 @@ const StyledTruncateBox = styled('div')<TruncateBoxProps>(
3637 content : "''" ,
3738 display : 'block' ,
3839 } ,
39- lineHeight : lineHeight ? matchSize (
40+ lineHeight : lineHeight
41+ ? matchSize (
4042 {
41- sm : '1.5rem' ,
42- xs : '1.25rem' ,
43+ sm : '1.5rem' ,
44+ xs : '1.25rem' ,
4345 } ,
44- lineHeight
45- ) : 'unset' ,
46- } )
46+ lineHeight ,
47+ )
48+ : 'unset' ,
49+ } ) ,
4750) ;
4851
4952export const TruncateBox = React . forwardRef < HTMLDivElement , TruncateBoxProps > (
50- ( props , ref ) => < StyledTruncateBox ref = { ref } { ...props } />
53+ ( props , ref ) => < StyledTruncateBox ref = { ref } { ...props } /> ,
5154) ;
5255
5356export default TruncateBox ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export type ActivableProps = {
1010 active ?: boolean ;
1111} ;
1212
13- export type Size = 0 | 1 | 2 | 3 | 4 | 5 ;
13+ export type Size = 0 | 1 | 1.6 | 2 | 3 | 4 | 5 ;
1414
1515export enum LabelFontSize {
1616 'default' = 'default' ,
You can’t perform that action at this time.
0 commit comments