Skip to content

[AnnouncementBar] Add variants, dismissible support, and fix typo #596

Description

@ravisuhag

Summary

Improvements to the AnnouncementBar component to fix accessibility issues, add missing features, and improve consistency.

Improvements

2. Add dismissible / onDismiss support

No way to dismiss/close the bar. A common pattern is an onDismiss callback with a close button.

3. Accept ReactNode for text prop

The text prop only accepts string. It could accept ReactNode for richer content (e.g., links, bold text).

4. Add warning, success, info variants

Only 3 variants exist (normal, gradient, error). Common additions: warning, success, info.

6. Fix announementBar typo

The CVA variable name announementBar is missing a c — should be announcementBar.

Moved to Cross-Cutting Issues

The following items have been moved to cross-cutting issues that address them across all components:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    componentIndividual component-level issuetriage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions