/** * Info note — a tinted aside explaining the control above it, marked with a * filled "i" badge. * * The plain `help` text a control renders itself (`.aureon-admin__desc`) says * the same kind of thing in the same voice, and stays the right choice for a * one-line clarification. This is for the longer note that carries a caveat or * a next step the reader has to act on — Product Catalog's sidebar note ("add * a widget to the Shop Sidebar for the column to appear") is the first — where * muted grey text sat below a control was routinely read straight past. */ import type { ReactNode } from 'react'; import { ArrowRight, Info } from 'lucide-react'; interface InfoNoteProps { children: ReactNode; /** * Optional call to action under the note, for the common case where the * "next step" it describes lives in another section — Category Display's * jump to Product Catalog → Catalog Display is the first. Rendered as a * link-styled button, since every host this runs on navigates in JS. */ actionLabel?: string; onAction?: () => void; /** * Arbitrary content under the note, for a next step this component can't * render itself — Cart's block-cart warning is the first: its "Use the * classic cart design" button is a server-declared field owned by the * companion plugin, not a callback to hand to `onAction`. Sits where the * action link would, so a note uses one or the other, not both. */ footer?: ReactNode; /** Warning tone — an amber ground and badge instead of the info blue. */ tone?: 'info' | 'warning'; } export default function InfoNote( { children, actionLabel, onAction, footer, tone = 'info', }: InfoNoteProps ) { return (
{ children }
{ footer } { actionLabel && onAction && ( ) }