import { StoryFn } from "@storybook/react-vite"; import UI from "#components/ui"; /** * A decorator that wraps a Storybook story with instructions and an optional title. * This decorator creates a container that displays instructions above the story component. * * @param {React.ReactNode} [instructions] - Optional instructions to display above the story * @param {string} [title] - Optional title for the instructions section. Defaults to "Story Instructions" * @returns {Function} A decorator function that wraps the story component * * @example * ```tsx * export const MyStory = Template.bind({}); * MyStory.decorators = [ * WithInstructions( *
Follow these steps to interact with the component...
, * "Usage Instructions" * ) * ]; * ``` */ export const WithInstructions = (instructions?: React.ReactNode, title?: string) => { const DecoratorComponent = (Story: StoryFn) => { return (