Repository navigation
feat(theme): add callout title/description size recipes matching toast - #315
Merged
Merged
Conversation
Add useCalloutTitleRecipe (callout-title) and useCalloutDescriptionRecipe (callout-description) so the callout carries the same per-size type scheme the toast recipe lands with. Title tracks the size axis on the literal token (sm/md/lg); description sits one token below at every step (xs/sm/md), default md. Values copied from the toast recipe's landed source so the two siblings cannot drift. Wires the size prop through the callout title and description components, adds colocated tests, a changeset, and the doc size table.
🦋 Changeset detectedLatest commit: 965d60e The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The playground consumes Storybook's Callout.vue via the @storybook-components alias; that component now imports calloutTitle/calloutDescription from virtual:styleframe, but the playground's own callout.styleframe.ts didn't register or export them, so plugin-playground#build failed with MISSING_EXPORT. Register useCalloutTitleRecipe/useCalloutDescriptionRecipe here to match the Storybook registration.
Merged
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add two callout sub-part recipes —
useCalloutTitleRecipe(callout-title) anduseCalloutDescriptionRecipe(callout-description) — that give the callout the same per-size type scheme the toast recipe lands with. The title tracks thesizeaxis on the literal token (sm→sm,md→md,lg→lg); the description sits one token below at every step (sm→xs,md→sm,lg→md), defaultmd. Thesizeprop is wired through the callout title/description components so the size stories render the scaled type.Why
The callout and toast are sibling feedback components and must read consistently. The callout title/description previously had no explicit per-size font axis — they inherited the callout root — while the toast recipe already carries the scheme. This copies the toast recipe's landed values exactly (title
sm/md/lg, description one token below atxs/sm/md) so the two recipes cannot drift. Implements SF-17.How verified
Notes
@styleframe/thememinor — purely additive recipes).