- Notifications
You must be signed in to change notification settings - Fork1k
chore: add new avatar component#15882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
dad8b9c
ad7e11a
8f48a83
40615ed
129269b
260171a
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,73 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import { Avatar,AvatarFallback, AvatarImage } from "./Avatar"; | ||
const meta: Meta<typeof Avatar> = { | ||
title: "components/Avatar", | ||
component: Avatar, | ||
args: { | ||
children: <AvatarImage src="https://github.com/kylecarbs.png" />, | ||
}, | ||
}; | ||
export default meta; | ||
type Story = StoryObj<typeof Avatar>; | ||
export const ImageLgSize: Story = { | ||
args: { size: "lg" }, | ||
}; | ||
export const ImageDefaultSize: Story = {}; | ||
export const ImageSmSize: Story = { | ||
args: { size: "sm" }, | ||
}; | ||
export const IconLgSize: Story = { | ||
args: { | ||
size: "lg", | ||
variant: "icon", | ||
children: ( | ||
<AvatarImage src="https://em-content.zobj.net/source/apple/391/billed-cap_1f9e2.png" /> | ||
), | ||
}, | ||
}; | ||
export constIconDefaultSize: Story = { | ||
args: { | ||
variant: "icon", | ||
children: ( | ||
<AvatarImage src="https://em-content.zobj.net/source/apple/391/billed-cap_1f9e2.png" /> | ||
), | ||
}, | ||
}; | ||
export constIconSmSize: Story = { | ||
args: { | ||
variant: "icon", | ||
size: "sm", | ||
children: ( | ||
<AvatarImage src="https://em-content.zobj.net/source/apple/391/billed-cap_1f9e2.png" /> | ||
), | ||
}, | ||
}; | ||
export constFallbackLgSize: Story = { | ||
args: { | ||
size: "lg", | ||
children: <AvatarFallback>AR</AvatarFallback>, | ||
}, | ||
}; | ||
export constFallbackDefaultSize: Story = { | ||
args: { | ||
children: <AvatarFallback>AR</AvatarFallback>, | ||
}, | ||
}; | ||
export constFallbackSmSize: Story = { | ||
args: { | ||
size: "sm", | ||
children: <AvatarFallback>AR</AvatarFallback>, | ||
}, | ||
}; |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.