feat(upselling-kit): add dismiss option to UpsellingAlert#4732
feat(upselling-kit): add dismiss option to UpsellingAlert#4732daviz-fct wants to merge 1 commit into
Conversation
Add an optional `onDismiss` callback to UpsellingAlert. When provided, a close button is rendered following the F0Alert pattern (sm outline button with the Cross icon), positioned to the right of the upselling action and pinned to the top-right in the stacked responsive layout. The consumer decides what happens on dismiss (e.g. hide for N days and reappear). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
✅ No New Circular DependenciesNo new circular dependencies detected. Current count: 0 |
📦 Alpha Package Version PublishedUse Use |
🔍 Visual review for your branch is published 🔍Here are the links to: |
|
Coverage Report for packages/react
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Description
Adds an optional dismiss affordance to
UpsellingAlert, following the same pattern already used byF0Alert. When anonDismisscallback is provided, a close button is shown so users can dismiss the upsell; the consumer owns the dismiss behaviour (e.g. persist it to hide the alert for N days and let it reappear afterwards).Screenshots (if applicable)
Implementation details
onDismissprop toUpsellingAlert; when provided, renders ansmoutline close button with theCrossicon, consistent withF0AlertuseI18n()is only read whenonDismissis set, keeping the alert renderable without anI18nProviderDismissiblestory and anonDismissboolean control to toggle the dismiss button, with an example handler that hides the alert for a number of days