import { iconNameList } from "./constants"; import { MaterialIcon } from "./index"; import { DocsPage } from "@shared/stories/DocsTemplate"; import type { Meta, StoryObj } from "@storybook/react"; const meta: Meta = { title: "Components/MaterialIcon", component: MaterialIcon, tags: ["autodocs"], parameters: { layout: "centered", docs: { page: DocsPage, description: { component: "Material Design icon component with customizable size, color, and styling.", }, }, }, argTypes: { name: { control: { type: "select" }, options: iconNameList, description: "Material icon name", }, size: { control: { type: "select" }, options: [20, 24, 32, 40, 48], description: "Icon size", }, weight: { control: { type: "select" }, options: [100, 200, 300, 400, 500, 600, 700], description: "Icon weight", }, color: { control: { type: "color" }, description: "Icon color", }, className: { control: { type: "text" }, description: "Additional CSS classes", }, }, args: { name: "home", size: 24, }, }; export default meta; type Story = StoryObj; // Default icon export const Default: Story = { args: {}, }; // Different sizes export const Sizes: Story = { render: () => (

20px

24px

40px

48px

), parameters: { docs: { description: { story: "All available icon sizes.", }, }, }, }; // Common icons export const CommonIcons: Story = { render: () => (

home

search

check

settings

groups

mail

call

info

), parameters: { docs: { description: { story: "Common Material Design icons.", }, }, }, }; // Colored icons export const ColoredIcons: Story = { render: () => (

Red

Green

Blue

Yellow

), parameters: { docs: { description: { story: "Icons with different colors.", }, }, }, }; // Icon with text export const IconWithText: Story = { render: () => (
Email notifications
Phone support
Live chat
Help center
), parameters: { docs: { description: { story: "Icons used alongside text content.", }, }, }, }; // Interactive icons export const InteractiveIcons: Story = { render: () => (
), parameters: { docs: { description: { story: "Interactive icon buttons.", }, }, }, }; // Status icons export const StatusIcons: Story = { render: () => (

Success

Error

Warning

Info

), parameters: { docs: { description: { story: "Status and feedback icons.", }, }, }, }; // All sizes showcase export const AllSizes: Story = { render: () => (

Icon Sizes

Small

Medium

Large

XLarge

Common Icons

home

search

check

settings

groups

mail

), parameters: { docs: { description: { story: "Complete showcase of all icon sizes and common icons.", }, }, }, };