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:
Summary
Improvements to the AnnouncementBar component to fix accessibility issues, add missing features, and improve consistency.
Improvements
2. Add
dismissible/onDismisssupportNo way to dismiss/close the bar. A common pattern is an
onDismisscallback with a close button.3. Accept
ReactNodefortextpropThe
textprop only acceptsstring. It could acceptReactNodefor richer content (e.g., links, bold text).4. Add
warning,success,infovariantsOnly 3 variants exist (
normal,gradient,error). Common additions:warning,success,info.6. Fix
announementBartypoThe CVA variable name
announementBaris missing ac— should beannouncementBar.Moved to Cross-Cutting Issues
The following items have been moved to cross-cutting issues that address them across all components: