-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(Avatar): add VR test for overrides (#16396)
- Loading branch information
1 parent
5feec8d
commit 74ae5d2
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
...ntui/docs/src/examples/components/Avatar/Visual/AvatarStatusOverrideExample.shorthand.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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import * as React from 'react'; | ||
import { Avatar, Provider, AcceptIcon } from '@fluentui/react-northstar'; | ||
|
||
const AvatarExampleShorthand = () => ( | ||
<Provider | ||
theme={{ | ||
componentStyles: { | ||
Avatar: { | ||
status: ({ variables: v }) => ({ ...(v.isFoo && { backgroundColor: 'red' }) }), | ||
}, | ||
}, | ||
}} | ||
> | ||
<Avatar | ||
status={{ | ||
icon: <AcceptIcon />, | ||
title: 'Available', | ||
}} | ||
/> | ||
<Avatar | ||
status={{ | ||
icon: <AcceptIcon />, | ||
title: 'Available', | ||
}} | ||
variables={{ isFoo: true }} | ||
/> | ||
</Provider> | ||
); | ||
|
||
export default AvatarExampleShorthand; |
12 changes: 12 additions & 0 deletions
12
packages/fluentui/docs/src/examples/components/Avatar/Visual/index.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import * as React from 'react'; | ||
|
||
import ComponentExample from '../../../../components/ComponentDoc/ComponentExample'; | ||
import NonPublicSection from '../../../../components/ComponentDoc/NonPublicSection'; | ||
|
||
const Usage = () => ( | ||
<NonPublicSection title="Visual tests"> | ||
<ComponentExample examplePath="components/Avatar/Visual/AvatarStatusOverrideExample" /> | ||
</NonPublicSection> | ||
); | ||
|
||
export default Usage; |
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