File tree Expand file tree Collapse file tree 2 files changed +43
-16
lines changed
pkg/webui/components/shortcut-panel/shortcut-item Expand file tree Collapse file tree 2 files changed +43
-16
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,13 @@ import style from './shortcut-item.styl'
25
25
26
26
const ShortcutItem = ( { icon, title, link } ) => (
27
27
< Link to = { link } className = { style . shortcut } >
28
- < Icon icon = "add" className = { style . addIcon } />
29
- < Icon icon = { icon } className = { style . icon } />
30
- < Message content = { title } className = { style . title } />
28
+ < div className = { style . addIconWrapper } >
29
+ < Icon icon = "add" className = { style . addIcon } />
30
+ </ div >
31
+ < div className = { style . shortcutTitleWrapper } >
32
+ < Icon icon = { icon } className = { style . icon } />
33
+ < Message content = { title } className = { style . title } />
34
+ </ div >
31
35
</ Link >
32
36
)
33
37
Original file line number Diff line number Diff line change 18
18
flex-direction : column
19
19
align-items : center
20
20
justify-content : center
21
+ position : relative
21
22
padding : $cs .s $cs .m
22
- transition : 0.2s background ease-in
23
23
text-decoration : none
24
24
height : 10.7rem
25
25
border-radius : $br .l
26
26
background : var (-- c-bg-brand-normal )
27
27
color : var (-- c-text-neutral-min )
28
28
font-size : $fs .m
29
29
font-weight : $fwv2 .semibold
30
+ transition : 0.2s background ease-in-out
31
+
32
+ & -title-wrapper
33
+ position : absolute
34
+ width : 100%
35
+ height : 100%
36
+ display : flex
37
+ justify-content : center
38
+ align-items : center
39
+ flex-direction : column
40
+ top : 0
41
+ opacity : 1
42
+ transition : $ad .s visibility ease-in-out , $ad .m opacity ease-in-out
43
+ transition-delay : $ad .s
44
+
45
+ .add-icon-wrapper
46
+ position : absolute
47
+ width : 100%
48
+ height : 100%
49
+ display : flex
50
+ justify-content : center
51
+ align-items : center
52
+ flex-direction : column
53
+ top : 0
54
+ opacity : 0
55
+ visibility : hidden
56
+ transition : $ad .s visibility ease-in-out , $ad .m opacity ease-in-out
57
+ transition-delay : $ad .s
30
58
31
59
span .icon
32
- transition : 0.2s display ease-out
33
60
font-size : 2rem
34
- display : block
35
61
36
62
span .add-icon
37
- transition : 0.2s display ease-in
38
63
font-size : 2.5rem
39
- display : none
40
-
41
- .title
42
- transition : 0.2s display ease-out
43
- display : block
44
64
45
65
& :hover
46
66
cursor : pointer
47
67
background : var (-- c-bg-brand-normal-hover )
48
68
49
- .title
50
- display : none
69
+ .shortcut-title-wrapper
70
+ opacity : 0
71
+ visibility : hidden
72
+
73
+ .add-icon-wrapper
74
+ opacity : 1
75
+ visibility : visible
51
76
52
77
span .icon
53
78
font-size : 2rem
54
- display : none
55
79
56
80
span .add-icon
57
81
font-size : 2.5rem
58
- display : block
You can’t perform that action at this time.
0 commit comments