fix(callout): match Figma styles for all variants#829
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR adds uncontrolled (self-hiding) dismissal to Callout while preserving numeric widths (including 0), simplifies role selection, and swaps the dismiss button to IconButton/Cross1Icon. callout.module.css updates base width to 400px, message wrapping, actions gap, gradient formatting, and several foreground/border token targets. Tests add controlled vs uncontrolled dismissal cases and width edge-case checks. Docs and props JSDoc clarify dismissal ownership and accessibility; the examples page gains a Callout showcase with a controlled dismissible example. Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Resolve Callout conflict from #829 (Figma styles): combine its IconButton dismiss + dismiss-state rework with our variant reshape and width removal. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Description
Aligns the Callout component with the design spec across all 24
type × outline × highContrastvariants, and fixes several component-quality issues surfaced during the audit.Both the design colours and the CSS design tokens were resolved to OKLCH for exact comparison (not eyeballed).
Styling fixes:
attention+ outline + highContrast border →border-attention-primary(the reported bug — was a greybase-tertiaryclashing with the cream fill);successhad the same bug →border-success-primarygrey/normal(non-high-contrast): text/icon →foreground-base-secondary; outline border →border-base-tertiary318px→400px; removed an inertgapon.callout-successComponent-quality fixes (found during audit):
width={0}is now applied (was dropped by a truthiness guard);style.widthhonoured asfallbackdismissiblewithoutonDismissnow self-hides (uncontrolled fallback); stays controlled whenonDismissis providedmax-width: 100%+overflow-wrap: break-wordto prevent overflow / long-word breakoutgetRoleand removed a duplicatetypedefaultType of Change
Note: the default-width change (
318px → 400px) and the uncontrolled-dismiss fallback are minor behaviour changes for consumers who relied on the old defaults — flagging for reviewer awareness.How Has This Been Tested?
width={0},style.widthfallback). Callout: 29/29 passing; full raystack suite: 1875/1875 passing.tscclean (no callout errors) and Biome clean on all changed files.Checklist:
Screenshots (if appropriate):
N/A
Related Issues
N/A