Skip to content

feat: Add boolean support for recipe variant props#167

Merged
alexgrozav merged 1 commit intomainfrom
alexgrozav/recipe-bool-variants
Apr 5, 2026
Merged

feat: Add boolean support for recipe variant props#167
alexgrozav merged 1 commit intomainfrom
alexgrozav/recipe-bool-variants

Conversation

@alexgrozav
Copy link
Copy Markdown
Contributor

This pull request adds support for boolean values in recipe variant props, allowing both true/false booleans and "true"/"false" strings to be used interchangeably for variants that define both options. The runtime, type definitions, and transpiler have all been updated to support this, and comprehensive tests have been added to ensure correct behavior.

Boolean variant support:

  • The runtime now accepts boolean true/false values for variant props when both "true" and "false" keys are defined in the variant, in addition to string values. [1] [2] [3] [4]
  • Type definitions (RecipeVariantProps) and generated .d.ts files now include | boolean in the type union for such variants, ensuring type safety and better developer experience. [1] [2] [3]

Testing:

  • Added comprehensive runtime and transpiler tests to verify boolean variant support, including correct selection, matching in compound variants, and type generation. [1] [2]

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 5, 2026

🦋 Changeset detected

Latest commit: 8574d6d

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

This PR includes changesets to release 3 packages
Name Type
@styleframe/runtime Minor
@styleframe/transpiler Minor
styleframe Minor

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
Copy link
Copy Markdown

vercel bot commented Apr 5, 2026

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

Project Deployment Actions Updated (UTC)
app-styleframe-dev-production Ready Ready Preview, Comment Apr 5, 2026 3:52am
styleframe-dev-production Ready Ready Preview, Comment Apr 5, 2026 3:52am
styleframe-storybook Ready Ready Preview, Comment Apr 5, 2026 3:52am

Request Review

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@alexgrozav alexgrozav merged commit 179c90d into main Apr 5, 2026
12 checks passed
@alexgrozav alexgrozav deleted the alexgrozav/recipe-bool-variants branch April 5, 2026 03:58
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