Create a ButtonLink variant for the Button component in React. This variant will be styled as a link, adhering to the design specifications outlined in the Button Audit and Insight Report Figma Board. It should integrate seamlessly with the shared UI component library and follow best practices for accessibility and responsiveness.
Technical Details
Component Implementation:
Extend or compose the ButtonBase component to create the ButtonLink variant.
Default props for this variant:
variant: "link"
Styles specific to the link button, such as underlined text and hover/active/focus states.
Props to support:
href?: string (optional, for cases where it is rendered as an <a> tag)
Description
Create a
ButtonLink
variant for theButton
component in React. This variant will be styled as a link, adhering to the design specifications outlined in the Button Audit and Insight Report Figma Board. It should integrate seamlessly with the shared UI component library and follow best practices for accessibility and responsiveness.Technical Details
Component Implementation:
ButtonBase
component to create theButtonLink
variant.variant: "link"
href?: string
(optional, for cases where it is rendered as an<a>
tag)size?: ButtonSize.Xs | ButtonSize.Sm | ButtonSize.Md | ButtonSize.Lg | ButtonSize.Xl
disabled?: boolean
onClick?: (event: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void
iconLeft?: ReactNode
iconRight?: ReactNode
className?: string
Styling:
Integration:
<button>
or<a>
element depending on the presence of anhref
prop.aria-disabled
and focus outlines must be included.Testing:
<button>
or<a>
, based on thehref
prop.Documentation:
ButtonLink
variant in Storybook, including:href
props.Acceptance Criteria
ButtonLink
variant matches the design specs in the Button Audit and Insight Report Figma Board.<button>
and<a>
elements.References