Skip to content

Commit

Permalink
Adds Controls example
Browse files Browse the repository at this point in the history
  • Loading branch information
jonniebigodes committed Dec 23, 2023
1 parent 7c277de commit c5f4c8d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/Avatar/Avatar.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ import { Avatar } from './Avatar';
export default {
title: 'Design System/Avatar',
component: Avatar,
/*
* More on Storybook argTypes at:
* https://storybook.js.org/docs/react/api/argtypes
*/
argTypes: {
size: {
control: {
type: 'select',
},
options: ['tiny', 'small', 'medium', 'large'],
},
},
};

export const Standard = {
Expand Down Expand Up @@ -66,3 +78,17 @@ export const Large = {
</>
),
};

/*
* New story using Controls
* Read more about Storybook templates at:
* https://storybook.js.org/docs/react/writing-stories/introduction#using-args
*/
export const Controls = {
args: {
loading: false,
size: 'tiny',
username: 'Dominic Nguyen',
src: 'https://avatars.githubusercontent.com/u/263385',
},
};

0 comments on commit c5f4c8d

Please sign in to comment.