Commit 23852af 1 parent 51c9617 commit 23852af Copy full SHA for 23852af
File tree 1 file changed +11
-3
lines changed
frontend/src/component/common/StrategyItemContainer
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { ConditionallyRender } from 'component/common/ConditionallyRender/Condit
8
8
import type { PlaygroundStrategySchema } from 'openapi' ;
9
9
import { Badge } from '../Badge/Badge' ;
10
10
import { Link } from 'react-router-dom' ;
11
+ import { Truncator } from '../Truncator/Truncator' ;
11
12
12
13
type StrategyItemContainerProps = {
13
14
strategyHeaderLevel ?: 1 | 2 | 3 | 4 | 5 | 6 ;
@@ -46,18 +47,25 @@ const StyledCustomTitle = styled('div')(({ theme }) => ({
46
47
} ) ) ;
47
48
const StyledHeaderContainer = styled ( 'hgroup' ) ( ( { theme } ) => ( {
48
49
display : 'flex' ,
49
- flexFlow : 'row' ,
50
+ flexFlow : 'row nowrap ' ,
50
51
columnGap : '1ch' ,
51
52
fontSize : theme . typography . body1 . fontSize ,
52
53
'.strategy-name' : {
53
54
fontWeight : 'bold' ,
55
+ whiteSpace : 'nowrap' ,
54
56
} ,
55
57
} ) ) ;
56
58
57
59
const StyledContainer = styled ( 'article' ) ( {
58
60
background : 'inherit' ,
59
61
} ) ;
60
62
63
+ const StyledTruncator = styled ( Truncator ) ( ( { theme } ) => ( {
64
+ fontSize : theme . typography . body1 . fontSize ,
65
+ fontWeight : 'normal' ,
66
+ margin : 0 ,
67
+ } ) ) ;
68
+
61
69
const NewStyledHeader = styled ( 'div' , {
62
70
shouldForwardProp : ( prop ) => prop !== 'draggable' && prop !== 'disabled' ,
63
71
} ) < { draggable : boolean ; disabled : boolean } > (
@@ -124,11 +132,11 @@ export const StrategyItemContainer: FC<StrategyItemContainerProps> = ({
124
132
) }
125
133
:
126
134
</ p >
127
- < Typography
135
+ < StyledTruncator
128
136
component = { `h${ strategyHeaderLevel } ` }
129
137
>
130
138
{ strategy . title }
131
- </ Typography >
139
+ </ StyledTruncator >
132
140
</ >
133
141
) : (
134
142
< Typography
You can’t perform that action at this time.
0 commit comments