import preview from "#.storybook/preview"; import { AutoShrink } from "../../src/ts/components/common/AutoShrink"; const meta = preview.meta({ title: "Common/AutoShrink", component: AutoShrink, parameters: { layout: "centered", }, tags: ["autodocs"], argTypes: { upperLimitRem: { control: "number" }, class: { control: "text" }, }, decorators: [ (Story) => (
400px container
200px container
100px container
), ], }); export const Default = meta.story({ args: { upperLimitRem: 2, children: "Short", }, }); export const LongText = meta.story({ args: { upperLimitRem: 2, children: "This is a much longer piece of text that should shrink to fit", }, }); export const LargeUpperLimit = meta.story({ args: { upperLimitRem: 4, children: "Big text", }, });