import { Text } from "../../../components/text"; import { useBreakpoints } from "."; import type { StoryObj, Meta } from "@storybook/react"; const meta: Meta = { title: "Hooks/useBreakpoints", argTypes: { object: { table: { category: "Return Value", type: { summary: "{ s: boolean; m: boolean; l: boolean; xl: boolean; }", }, }, description: "Returns an object with breakpoint-boolean key-value pairs based on the current active breakpoint.", control: false, type: "string", }, }, }; export default meta; type Story = StoryObj; export const Default: Story = { render: () => { // eslint-disable-next-line react-hooks/rules-of-hooks const bps = useBreakpoints(); return ( Current breakpoint table is:
{JSON.stringify(bps)}
resize window and the output changes accordingly.
); }, };