-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: v0 Loader style migration from v9 (#25169)
* Add new secondary svg loader * Remove the unused style * Generate loader svg based on theme color * Add new svg loader * Encode svg color with encodeURIComponent function * Loader gets rendered as <svg> and <circle> tags * Removed svg urls * Add stroke color variables and secondary stroke * Change svg heights * Styling the Loader's <svg> and <circle> * Use defined classname instead of nested selectors * Remove unused interface variables * Add @NoFlip to fix rtl rotate animation * Set the loader track color of HC theme in black * Set black background to HC secondary example * Renamed variable * Change loader's height when it is inside a button * Add changelog entry * Update changelog entry * Change background color to secondary examples * Function to get the common styles of the circles * Remove unused svg classname * Change loader's height when inside an attachment Co-authored-by: Enrico <[email protected]>
- Loading branch information
1 parent
c485aa5
commit 7f287bc
Showing
13 changed files
with
116 additions
and
111 deletions.
There are no files selected for viewing
This file contains 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
34 changes: 19 additions & 15 deletions
34
packages/fluentui/docs/src/examples/components/Loader/Variations/LoaderExampleSecondary.tsx
This file contains 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,20 +1,24 @@ | ||
import { Loader, Flex, Provider } from '@fluentui/react-northstar'; | ||
import * as React from 'react'; | ||
|
||
const LoaderExampleSecondary: React.FC = () => ( | ||
<Provider.Consumer | ||
render={theme => ( | ||
<Flex | ||
style={{ | ||
backgroundColor: theme.siteVariables.colorScheme.brand.background, | ||
padding: 8, | ||
width: 'fit-content', | ||
}} | ||
> | ||
<Loader secondary /> | ||
</Flex> | ||
)} | ||
/> | ||
); | ||
const LoaderExampleSecondary: React.FC = () => { | ||
return ( | ||
<Provider.Consumer | ||
render={theme => { | ||
return ( | ||
<Flex | ||
style={{ | ||
backgroundColor: theme.siteVariables.colorScheme.brand.backgroundActive, | ||
padding: 8, | ||
width: 'fit-content', | ||
}} | ||
> | ||
<Loader secondary /> | ||
</Flex> | ||
); | ||
}} | ||
/> | ||
); | ||
}; | ||
|
||
export default LoaderExampleSecondary; |
This file contains 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 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
5 changes: 5 additions & 0 deletions
5
...entui/react-northstar/src/themes/teams-high-contrast/components/Loader/loaderVariables.ts
This file contains 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,5 @@ | ||
import { LoaderVariables } from '../../../teams/components/Loader/loaderVariables'; | ||
|
||
export const loaderVariables = (siteVariables: any): Partial<LoaderVariables> => ({ | ||
svgTrackColor: siteVariables.colors.black, | ||
}); |
This file contains 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 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 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 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
1 change: 0 additions & 1 deletion
1
.../fluentui/react-northstar/src/themes/teams/components/Loader/loaderSecondarySvgDataUrl.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.