diff --git a/src/components/Button/Button.tsx b/src/components/Button/Button.tsx index 1fedec40..1d357746 100644 --- a/src/components/Button/Button.tsx +++ b/src/components/Button/Button.tsx @@ -8,7 +8,9 @@ const buttonVariants = cva( 'inline-flex items-center justify-center gap-2', 'font-semibold transition-all duration-200', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2', - 'disabled:pointer-events-none disabled:opacity-50', + // Web-app affordance: buttons look clickable. (Tailwind v4 preflight + // resets buttons to cursor: default; QuickAction already opts back in.) + 'cursor-pointer disabled:pointer-events-none disabled:opacity-50', 'active:scale-[0.98]', ], { @@ -29,11 +31,14 @@ const buttonVariants = cva( ], ghost: [ 'bg-transparent text-neutral-600', - 'hover:bg-neutral-100', - 'active:bg-neutral-200', + // One token step stronger than before: neutral-100 on a white page + // is a ~4% delta most displays can't show, so hover read as + // "nothing happens" and users only saw the active state on click. + 'hover:bg-neutral-200', + 'active:bg-neutral-300', 'dark:text-neutral-400', - 'dark:hover:bg-neutral-800', - 'dark:active:bg-neutral-700', + 'dark:hover:bg-neutral-700', + 'dark:active:bg-neutral-600', ], outline: [ 'border-2 border-primary-800 text-primary-800 bg-transparent', diff --git a/src/components/ButtonLink/ButtonLink.stories.tsx b/src/components/ButtonLink/ButtonLink.stories.tsx new file mode 100644 index 00000000..f83f9d86 --- /dev/null +++ b/src/components/ButtonLink/ButtonLink.stories.tsx @@ -0,0 +1,163 @@ +import type { Meta, StoryObj } from '@storybook/react-vite'; +import * as React from 'react'; +import { Plus, ExternalLink, ArrowLeft, Pencil } from 'lucide-react'; +import { ButtonLink } from './ButtonLink'; + +const meta: Meta = { + title: 'Components/Forms & Inputs/ButtonLink', + component: ButtonLink, + parameters: { + layout: 'centered', + docs: { + description: { + component: [ + 'A navigation link styled exactly like `Button`, sharing its `buttonVariants`.', + '', + 'Use it wherever a click **navigates**: it renders a real link element, so users keep', + 'middle-click / Ctrl+click to open in a new tab, "copy link address", URL preview on', + 'hover, and assistive technology announces it as a link. Wrapping a `