Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add callout component #498

Merged
merged 12 commits into from
Nov 20, 2024
Merged

Add callout component #498

merged 12 commits into from
Nov 20, 2024

Conversation

mkernohanbc
Copy link
Contributor

@mkernohanbc mkernohanbc commented Nov 12, 2024

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:

  • title
  • description
  • buttons (renders a <ButtonGroup> and expects an array of button components)

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.

@mkernohanbc mkernohanbc added the enhancement New feature or request label Nov 12, 2024
@mkernohanbc mkernohanbc added this to the Components v0.5.0 milestone Nov 12, 2024
@mkernohanbc mkernohanbc self-assigned this Nov 12, 2024
Copy link
Contributor

@Supriya-Arora Supriya-Arora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. We will be addressing callout test cases in another PR.

@mkernohanbc mkernohanbc marked this pull request as ready for review November 19, 2024 19:23
@mkernohanbc mkernohanbc merged commit e020510 into bcgov:main Nov 20, 2024
2 checks passed
@mkernohanbc mkernohanbc deleted the feature/callout branch December 11, 2024 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants