bcgov / design-system

The B.C. Design System helps public sector design and development teams build consistent, accessible products
https://gov.bc.ca/designsystem
Apache License 2.0
57 stars 38 forks source link

Add callout component #498

Open mkernohanbc opened 1 week ago

mkernohanbc commented 1 week ago

This PR adds a new Callout component and docs/examples on Storybook. Callouts are used to visually differentiate and highlight important content within an interface:

Screenshot 2024-11-12 at 10 22 31

Callout renders a <div> with the ARIA note role. The user can define a different ARIA role via the role prop.

It supports a default content composition using these props:

Alternatively, the user can pass some components to the children slot to override the default content layout and compose their own UI.

Callout includes 6 visual themes, set via the variant prop. The coloured stroke on the left edge can be disabled via the isLeftBorderDisabled prop.