File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
packages/components/components/tabs Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 1
1
@import ' ~@proton/styles/scss/lib' ;
2
2
3
3
.tabs {
4
- & .withTransition > & -nav & -link {
4
+ & .with-transition > & -nav & -link {
5
5
transition : 0.15s easing (ease-out-quint );
6
6
}
7
7
45
45
}
46
46
}
47
47
48
- & --underline .withTransition > & -nav & -indicator {
48
+ & --underline .with-transition > & -nav & -indicator {
49
49
transition : transform 0.15s easing (ease-out-quad );
50
50
}
51
51
58
58
transform : translateX (var (--tabs_translate )) scaleX (var (--tabs_scale ));
59
59
border-block-end : 2px solid var (--interaction-norm );
60
60
61
+ & .hides {
62
+ transition : opacity 0.1s linear 0.1s ;
63
+
64
+ & .hide {
65
+ opacity : 0 ;
66
+ }
67
+ }
68
+
61
69
@at-root {
62
70
[dir = ' rtl' ] & {
63
71
transform-origin : right center ;
111
119
}
112
120
}
113
121
114
- & --modern .withTransition > & -nav & -indicator {
122
+ & --modern .with-transition > & -nav & -indicator {
115
123
transition-property : transform , inline-size ;
116
124
transition-duration : 0.3s ;
117
125
transition-timing-function : easing (ease-out-quad );
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ export const Tabs = ({
109
109
if ( ! isReady && translate !== undefined && scale !== undefined && width !== undefined ) {
110
110
setReady ( true ) ;
111
111
setTimeout ( ( ) => {
112
- rootRef . current ?. classList . add ( 'withTransition ' ) ;
112
+ rootRef . current ?. classList . add ( 'with-transition ' ) ;
113
113
indicatortRef . current ?. classList . remove ( 'hides' ) ;
114
114
} , 300 /* same with transition duration in css */ ) ;
115
115
}
@@ -151,7 +151,7 @@ export const Tabs = ({
151
151
role = "tablist"
152
152
ref = { containerRef }
153
153
style = {
154
- translate && scale && width
154
+ translate !== undefined && scale !== undefined && width !== undefined
155
155
? { '--tabs_translate' : translate , '--tabs_scale' : scale , '--tabs_width' : width }
156
156
: { }
157
157
}
You can’t perform that action at this time.
0 commit comments