import { CallButton } from "./index"; import { DocsPage } from "@shared/stories/DocsTemplate"; import type { Meta, StoryObj } from "@storybook/react"; const meta: Meta = { title: "Components/CallButton", component: CallButton, tags: ["autodocs"], parameters: { layout: "centered", docs: { page: DocsPage, description: { component: "A call button component that extends the Link component with a call icon and optional blinking dot.", }, }, }, argTypes: { showBlinkDot: { control: { type: "boolean" }, description: "Show a blinking dot indicator", }, buttonStyle: { control: { type: "select" }, options: ["primary"], description: "Visual style variant", }, size: { control: { type: "select" }, options: ["sm", "md", "lg"], description: "Button size", }, href: { control: { type: "text" }, description: "Link destination", }, children: { control: { type: "text" }, description: "Button text content", }, className: { control: { type: "text" }, description: "Additional CSS classes", }, }, args: { href: "tel:+1234567890", children: "Call Now", showBlinkDot: false, buttonStyle: "primary", size: "md", }, }; export default meta; type Story = StoryObj; // All variants showcase - Real visual variants export const AllVariants: Story = { render: () => (

Style Variants

Primary (Default)

Call Now

Size Variants

Small

Call

Medium (Default)

Call Now

Large

Call Now

Blinking Dot Variant

Emergency Hotline
), parameters: { docs: { description: { story: "Complete showcase of all CallButton visual variants: styles, sizes, and blinking dot.", }, }, }, }; // Default call button export const Default: Story = { args: { buttonStyle: "primary", size: "md", showBlinkDot: false, }, parameters: { docs: { description: { story: "Default CallButton with primary style and medium size.", }, }, }, }; // Call button with blinking dot export const WithBlinkDot: Story = { args: { showBlinkDot: true, children: "Call Now", buttonStyle: "primary", size: "md", }, parameters: { docs: { description: { story: "CallButton with blinking dot indicator for emergency or priority calls.", }, }, }, }; // Style variations export const StyleVariations: Story = { render: () => (

Primary Style

Call Support
), parameters: { docs: { description: { story: "All four CallButton style variants: primary, secondary, outline, and ghost.", }, }, }, }; // Size variations export const SizeVariations: Story = { render: () => (

Small Size

Call

Medium Size (Default)

Call Now

Large Size

Call Now
), parameters: { docs: { description: { story: "All three CallButton size variants: small, medium, and large.", }, }, }, }; // Interactive combinations export const Interactive: Story = { render: () => (

Emergency Contacts

Emergency Hotline
), parameters: { docs: { description: { story: "Interactive examples showing combinations of CallButton variants for different use cases.", }, }, }, }; // States and interactions export const StatesAndInteractions: Story = { render: () => (

Hover States

Hover over the buttons to see interactive states

Hover Me Hover Me Too

Focus States

Tab to focus and see keyboard navigation states

Focus Me Focus Me Too
), parameters: { docs: { description: { story: "Demonstrates hover, focus, and interaction states of the CallButton component.", }, }, }, }; // Accessibility showcase export const Accessibility: Story = { render: () => (

Screen Reader Friendly

These buttons include proper ARIA labels and descriptions

Emergency Support Customer Service
), parameters: { docs: { description: { story: "Accessibility features including ARIA labels and screen reader support.", }, }, }, };