import { playgroundParameters } from "@charcuterie/storybook-config/story-parameters" import { CATEGORICAL_INDEXES } from "@charcuterie/tokens" import type { Meta, StoryObj } from "@storybook/react" import { categoricalArgType } from "../argTypes.storyHelpers.ts" import { Button } from "../Button/Button.tsx" import { ContainerBoard, StoryCell, StoryGrid, } from "../board.storyHelpers.tsx" import { SettingsIcon } from "../icons.storyHelpers.tsx" import { MetricCard } from "./MetricCard.tsx" const meta = { title: "Components/Data/MetricCard", component: MetricCard, parameters: { layout: "padded" }, argTypes: { categorical: categoricalArgType }, args: { heading: "Energy", value: "0.35 kWh", categorical: 3, icon: , children:

Measured during the selected period

, }, } satisfies Meta export default meta type Story = StoryObj export const Playground: Story = { parameters: playgroundParameters, } export const AllVariants: Story = { render: () => ( {CATEGORICAL_INDEXES.map((categorical) => ( } /> ))} ), } export const AllStates: Story = { render: () => (

No meter is connected.

), } export const Responsive: Story = { render: () => ( {(width) => ( } >

Includes the recorded filament and energy costs.

)}
), } export const Interactive: Story = { args: { footer: ( ), }, }