import { expect, screen, userEvent, waitFor, within } from "storybook/test"; import type { Meta, StoryObj } from "@storybook/react-vite"; import { ArrowLeftDuotoneIcon, ArrowLeftRegularIcon, } from "alouette-icons/phosphor-icons/ArrowLeft"; import { type ReactNode, useState } from "react"; import { AccentScope } from "../containers/AccentScope"; import { DensityScope } from "../containers/DensityScope"; import { Text } from "../primitives/Text"; import { View } from "../primitives/View"; import { Story, neutralAndAccents } from "../story-components/Story"; import { StoryGrid, stateTitle } from "../story-components/StoryGrid"; import { Button, type ButtonProps, ExternalLinkButton } from "./Button"; type ThisStory = StoryObj; export default { title: "alouette/Actions/Button", component: Button, parameters: { componentSubtitle: "A versatile button component that combines text and optional icons into a unified interactive element", docs: { description: { component: `### Variants - \`variant\`: tonal | filled | outlined | soft - \`size\`: sm (38px) | md (44px) | lg (52px) — 32 / 36 / 44px in a compact \`DensityScope\`. \`lg\` is the prominent call to action of a landing page or a hero, not a size for an action among others - \`accent\`: brand | danger | info | success | warning | neutral — unset, the accent of the nearest accent scope, brand outside one \`tonal\` (default) is a ground lighter than the page, lifted by a shadow, whose ink carries the accent. \`filled\` is the accent's own flat fill under white ink, for the one action that must dominate. The secondary action beside a primary one is \`accent="neutral" variant="soft"\`: a neutral text button, with no ground to compete with the primary. \`accent="neutral"\` alone is the neutral tonal button — the same material on the neutral tokens — for a lone action that must not carry the accent. ### Usage ~~~tsx