/* ! * (c) Copyright 2026 Palantir Technologies Inc. All rights reserved. */ import type { Meta, StoryObj } from "@storybook/react-vite"; import { storybookLayoutDecorator, StoryLabel } from "@storybook-common"; import { CircleArrowDownIcon, HouseIcon, PlayFilledIcon, PlayIcon } from "@blueprintjs/icons/next"; import { Intent } from "../../common"; import { Button } from "../button/buttons"; import { IconNext } from "./iconNext"; const meta: Meta = { title: "Next Icons/IconNext", component: IconNext, decorators: [storybookLayoutDecorator], parameters: { layout: "centered", }, } satisfies Meta; export default meta; type Story = StoryObj; /** * Dynamic string usage — the icon is loaded asynchronously by name. */ export const DynamicString: Story = { name: "Dynamic String", render: () => (
), }; /** * Element passthrough — works the same as current Icon. */ export const ElementPassthrough: Story = { name: "Element Passthrough", render: () => (
} /> } /> } />
), }; /** * Outlined vs filled variant switching. */ export const VariantComparison: Story = { name: "Variants", render: () => (
), }; /** * Filled fallback — requesting "filled" on an icon without a filled variant * silently falls back to outlined. A dev-mode console warning is emitted. */ export const FilledFallback: Story = { name: "Filled Fallback", render: () => (
), }; /** * Side-by-side: dynamic IconNext vs static component. */ export const DynamicVsStatic: Story = { name: "Dynamic vs Static", render: () => (
), }; /** * IconNext used inside Blueprint components via icon prop. */ export const InComponents: Story = { name: "In Components", render: () => (
{Object.values(Intent).map(intent => (
{Object.values(Intent).map(intent => (
), };