Skip to content

Commit

Permalink
chore(Avatar): add VR test for overrides (#16396)
Browse files Browse the repository at this point in the history
  • Loading branch information
assuncaocharles committed Jan 6, 2021
1 parent 5feec8d commit 74ae5d2
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
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;
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;
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ import Types from './Types';
import Variations from './Variations';
import Usage from './Usage';
import Performance from './Performance';
import Visual from './Visual';

const AvatarExamples = () => (
<>
<Types />
<Variations />
<Rtl />
<Usage />
<Visual />
<Performance />
</>
);
Expand Down

0 comments on commit 74ae5d2

Please sign in to comment.