Skip to content

Commit

Permalink
feat: Adding subtle transition between states on Button components (m…
Browse files Browse the repository at this point in the history
…icrosoft#25106)

* feat: Adding subtle transition between states on Button components.

* Adding change file.

Co-authored-by: Humberto Makoto Morimoto Burgos <[email protected]>
  • Loading branch information
2 people authored and NotWoods committed Nov 18, 2022
1 parent 6b570d2 commit ff38dc7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "feat: Adding subtle transition between states on Button components.",
"packageName": "@fluentui/react-button",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ const useRootStyles = makeStyles({
},
},

// Transition styles
transition: {
transitionDuration: '100ms',
transitionProperty: 'background, border, color',
transitionTimingFunction: 'cubic-bezier(0.33, 0, 0.67, 1)',

'@media screen and (prefers-reduced-motion: reduce)': {
transitionDuration: '0.01ms',
},
},

// High contrast styles
highContrast: {
'@media (forced-colors: active)': {
Expand Down Expand Up @@ -450,6 +461,7 @@ export const useButtonStyles_unstable = (state: ButtonState): ButtonState => {

// Root styles
rootStyles.base,
rootStyles.transition,
rootStyles.highContrast,
appearance && rootStyles[appearance],
rootStyles[size],
Expand Down

0 comments on commit ff38dc7

Please sign in to comment.