import type { Meta, StoryObj } from "@storybook/react-vite"; import * as React from "react"; import { expect, within } from "storybook/test"; import { Body, H1, H2, H3, P } from "../typography"; import { Bool } from "./bool"; const meta: Meta = { title: "Icon/Bool", component: Bool, }; export default meta; type Story = StoryObj; export const True: Story = { args: { value: true, }, play: ({ canvasElement }) => { const canvas = within(canvasElement); const boolean = canvas.getByLabelText("Yes"); expect(boolean).toBeVisible(); expect(boolean.children).toHaveLength(1); }, }; export const False: Story = { args: { value: false, }, play: ({ canvasElement }) => { const canvas = within(canvasElement); const boolean = canvas.getByLabelText("No"); expect(boolean).not.toBeVisible(); expect(boolean.children).toHaveLength(1); }, }; export const ExplicitFalse: Story = { args: { explicit: true, value: false, }, play: ({ canvasElement }) => { const canvas = within(canvasElement); const boolean = canvas.getByLabelText("No"); expect(boolean).toBeVisible(); expect(boolean.children).toHaveLength(1); }, }; export const BooleanInText: Story = { args: { value: true, }, render: (args) => (

The quick brown fox jumps over the lazy dog 

The quick brown fox jumps over the lazy dog 

The quick brown fox jumps over the lazy dog 

The quick brown fox jumps over the lazy dog 

The quick brown fox jumps over the lazy dog 

), };