File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
packages/react-components/react-motion-components-preview/stories/src/Rotate Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -28,10 +28,10 @@ const useClasses = makeStyles({
28
28
perspectiveOrigin : 'center center' ,
29
29
height : '140px' ,
30
30
cursor : 'pointer' ,
31
- transition : 'transform 0.2s ease' ,
32
31
borderRadius : tokens . borderRadiusMedium ,
32
+ transition : `scale ${ motionTokens . durationSlow } ms ${ motionTokens . curveDecelerateMid } ` ,
33
33
'&:hover' : {
34
- transform : 'translateY(-2px) ' ,
34
+ scale : '105% ' ,
35
35
} ,
36
36
} ,
37
37
patternCard : {
@@ -155,11 +155,15 @@ export const CardFlip = () => {
155
155
}
156
156
} ;
157
157
158
+ const getToggleButtonText = ( ) => {
159
+ return activePatterns . size === patterns . length ? 'Flip to Back' : 'Flip to Front' ;
160
+ } ;
161
+
158
162
return (
159
163
< div className = { classes . container } >
160
164
< div className = { classes . controls } >
161
165
< Button onClick = { toggleAllPatterns } aria-label = "Toggle all rotation patterns" >
162
- Flip All
166
+ { getToggleButtonText ( ) }
163
167
</ Button >
164
168
</ div >
165
169
You can’t perform that action at this time.
0 commit comments