File tree Expand file tree Collapse file tree 2 files changed +18
-14
lines changed
src/page/archiving/component/TimeBlock Expand file tree Collapse file tree 2 files changed +18
-14
lines changed Original file line number Diff line number Diff line change
1
+ import { css } from '@emotion/react' ;
2
+
1
3
import { theme } from '@/common/style/theme/theme' ;
2
4
3
- export const blockStyle = {
4
- display : 'flex' ,
5
+ export const blockStyle = ( width : number ) =>
6
+ css ( {
7
+ display : 'flex' ,
5
8
6
- height : '5.6rem' ,
7
- padding : '0.5rem' ,
8
- justifyContent : 'center' ,
9
- alignItems : 'center' ,
9
+ width : `${ width } rem` ,
10
+ height : '5.6rem' ,
11
+ padding : '0.5rem' ,
12
+ justifyContent : 'center' ,
13
+ alignItems : 'center' ,
10
14
11
- borderRadius : '100px' ,
15
+ borderRadius : '100px' ,
12
16
13
- backgroundColor : theme . colors . blue_100 ,
14
- ...theme . text . body03 ,
17
+ backgroundColor : theme . colors . blue_100 ,
18
+ ...theme . text . body03 ,
15
19
16
- overflow : 'hidden' ,
17
- textOverflow : 'ellipsis' ,
18
- whiteSpace : 'nowrap' ,
19
- } ;
20
+ overflow : 'hidden' ,
21
+ textOverflow : 'ellipsis' ,
22
+ whiteSpace : 'nowrap' ,
23
+ } ) ;
20
24
21
25
export const spanStyle = {
22
26
padding : '2rem 0.8rem' ,
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ interface TimeBlockProps {
12
12
const TimeBlock = ( { children, width } : TimeBlockProps ) => {
13
13
return (
14
14
< >
15
- < div css = { [ blockStyle , { width : ` ${ width } rem` } ] } >
15
+ < div css = { blockStyle ( width ) } >
16
16
< Eclipse width = { 47 } height = { 47 } css = { { flexShrink : 0 } } />
17
17
< span css = { spanStyle } > { children } </ span >
18
18
</ div >
You can’t perform that action at this time.
0 commit comments