import type { Meta, StoryObj } from "@storybook/nextjs-vite" import { Avatar } from "." import { config } from "./variants" const meta: Meta = { title: "Core Components/Avatar", component: Avatar, parameters: { layout: "centered", }, argTypes: { size: { control: { type: "select" }, options: Object.keys(config.variants.size), }, }, } export default meta type Story = StoryObj const imageFile = "./img/profile-picture.png" as const export const WithImage: Story = { args: { src: imageFile, alt: "Profile photo", size: "md", }, } export const WithInitials: Story = { args: { initials: "FR", size: "md", }, } export const Fallback: Story = { args: { size: "md", }, } export const SmallSize: Story = { render: () => (
), } export const MediumSize: Story = { render: () => (
), } export const LargeSize: Story = { render: () => (
), } export const AllSizes: Story = { render: () => (
Small (20px)
Medium (32px)
Large (55px)
), }