This repository was archived by the owner on Mar 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
feat(Provider): add option for disabling animations #1377
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
60ca2c9
-added fela plugin for disabling animations
c5d2da9
-fixed Animation issue
663daa0
-removed disableAnimations from the Provider
67d116f
-added neverDisableAnimation on the components
e03d018
-reverted neverDisableAnimations logic
baeb480
-added rtl, disableAnimations and renderer as a separate props to the…
6242f12
-fixed tests
e533439
-fixed imports in Provider
4fd2594
-added tests for mergeBooleanValues and mergeContexts
863420b
-updated ProviderConsumer test
ba8fc9c
-reverted changes in the Provider.Consumer component
b914cfc
-fixes
4fe73fb
-fixed test description
8272a21
-added renderer test
d8c4971
-added type check for RULE in the fela plugin
22abdc5
-addressed PR comments
87598ff
-updated typings
8a127ae
-addressing comments
64a4fb3
-fixed import
993be69
Merge branch 'master' into feat/disable-animations
2cb703b
-change createAnimationStyles signiture to use theme instead of context
d8c1a97
-improved Provider test
8bbb92a
-addressed PR comments
37c6ab5
Merge branch 'master' into feat/disable-animations
00bef47
-merge conflicts
864e38d
-added Provider example for rtl and disableAnimations
4b90696
-renamed examples
498394f
Merge branch 'master' into feat/disable-animations
94d1875
-updated changelog
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
docs/src/examples/components/Provider/Types/ProviderDisableAnimationsExample.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import * as React from 'react' | ||
| import { Animation, Icon, Provider } from '@stardust-ui/react' | ||
|
|
||
| const spinner = { | ||
| keyframe: { | ||
| from: { | ||
| transform: 'rotate(0deg)', | ||
| }, | ||
| to: { | ||
| transform: 'rotate(360deg)', | ||
| }, | ||
| }, | ||
| duration: '5s', | ||
| iterationCount: 'infinite', | ||
| } | ||
|
|
||
| const AnimatedIcon = () => ( | ||
| <Animation name="spinner"> | ||
| <Icon name="umbrella" circular bordered /> | ||
| </Animation> | ||
| ) | ||
|
|
||
| const ProviderExampleAnimation = () => ( | ||
| <Provider theme={{ animations: { spinner } }}> | ||
| {'This icon will be animated'} | ||
| <br /> | ||
| <AnimatedIcon /> | ||
| <Provider disableAnimations> | ||
| {'This icon will not be animated, as animations are disabled in this tree'} | ||
| <br /> | ||
| <AnimatedIcon /> | ||
| </Provider> | ||
| </Provider> | ||
| ) | ||
|
|
||
| export default ProviderExampleAnimation |
10 changes: 10 additions & 0 deletions
10
docs/src/examples/components/Provider/Types/ProviderRtlExample.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| import * as React from 'react' | ||
| import { Provider } from '@stardust-ui/react' | ||
|
|
||
| const ProviderRtlExample = () => ( | ||
| <Provider rtl> | ||
| <div>{'مثال النص'}</div> | ||
| </Provider> | ||
| ) | ||
|
|
||
| export default ProviderRtlExample |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 4 additions & 8 deletions
12
docs/src/prototypes/meetingOptions/components/MSTeamsLink.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,11 @@ | ||
| import * as React from 'react' | ||
| import { Provider, Text } from '@stardust-ui/react' | ||
| import { Text } from '@stardust-ui/react' | ||
|
|
||
| export default props => { | ||
| const { content, children } = props | ||
| return ( | ||
| <Provider.Consumer | ||
| render={({ siteVariables }) => ( | ||
| <Text as="a" content={content} color="brand"> | ||
| {children} | ||
| </Text> | ||
| )} | ||
| /> | ||
| <Text as="a" content={content} color="brand"> | ||
| {children} | ||
| </Text> | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As these are applied on div elements, we need the React.CSSProperties as a type