Skip to content

feat(theme): add callout icon, content, and dismiss sub-part recipes#280

Merged
alexgrozav merged 2 commits into
mainfrom
alexgrozav/callout-dismiss-content-parts
Jul 5, 2026
Merged

feat(theme): add callout icon, content, and dismiss sub-part recipes#280
alexgrozav merged 2 commits into
mainfrom
alexgrozav/callout-dismiss-content-parts

Conversation

@alexgrozav

Copy link
Copy Markdown
Contributor

Description

Splits the Callout component's icon wrapper, content area, and dismiss button into dedicated base-only recipes (useCalloutIconRecipe, useCalloutContentRecipe, useCalloutDismissRecipe). The root callout recipe now collapses when the hidden attribute is set, enabling dismiss-by-hidden-attribute patterns. Storybook components and docs are updated to use the new sub-part recipes.

Related issue

Type of change

  • 🐞 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that changes existing behavior)
  • 📖 Documentation
  • ♻️ Refactor / internal (no functional change)
  • 🔧 Build / tooling / CI

Checklist

  • My commits follow Conventional Commits with a package scope (e.g. feat(theme): …)
  • I ran pnpm build:nodocs && pnpm lint && pnpm typecheck && pnpm test and everything passes
  • I added a changeset (pnpm changeset) for changes to publishable packages, or this change only touches docs/storybook/app/playground/tests
  • I added or updated tests where relevant
  • I updated documentation where relevant
  • I did not edit generated files (dist/, .styleframe/)
  • My PR targets main and stays focused in scope

Notes / screenshots

Three new base-only composables (useCalloutIconRecipe, useCalloutContentRecipe, useCalloutDismissRecipe) are exported from @styleframe/theme. The shared dismiss button logic lives in theme/src/recipes/dismiss/createDismissRecipe.ts and is reused by useCalloutDismissRecipe. A new Dismissible Storybook story demonstrates the dismiss-by-hidden-attribute pattern.

Splits callout's icon wrapper, content area, and dismiss button into
dedicated base-only recipes (useCalloutIconRecipe, useCalloutContentRecipe,
useCalloutDismissRecipe). The root callout recipe now collapses when the
hidden attribute is set. Updates Storybook component, stories, and docs.
@changeset-bot

changeset-bot Bot commented Jul 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4cd7094

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@styleframe/theme Minor
@styleframe/playground Patch

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

@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
storybook-styleframe-dev Ready Ready Preview, Comment Jul 5, 2026 1:19pm
styleframe-dev Ready Ready Preview, Comment Jul 5, 2026 1:19pm

Request Review

@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@alexgrozav alexgrozav merged commit b68ca30 into main Jul 5, 2026
15 checks passed
@alexgrozav alexgrozav deleted the alexgrozav/callout-dismiss-content-parts branch July 5, 2026 17:32
@github-actions github-actions Bot mentioned this pull request Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant