Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support custom conditions / psuedo props #8218

Merged
merged 4 commits into from
Jan 31, 2024

Conversation

segunadebayo
Copy link
Member

📝 Description

Add support for custom theme conditions or pseudo props via theme.conditions

// theme.ts

const theme = extendTheme({
  conditions: {
    closed: "&[data-state='closed']", // pseudo prop
  }
})

⛳️ Current behavior (updates)

No way to add custom pseudo props or conditions

🚀 New behavior

Now possible

💣 Is this a breaking change (Yes/No):

No

📝 Additional Information

Copy link

changeset-bot bot commented Jan 16, 2024

🦋 Changeset detected

Latest commit: 31719d4

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

This PR includes changesets to release 4 packages
Name Type
@chakra-ui/styled-system Minor
@chakra-ui/react Minor
@chakra-ui/theme Minor
@chakra-ui/test-utils 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

Copy link

vercel bot commented Jan 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
chakra-ui-storybook ✅ Ready (Inspect) Visit Preview Jan 16, 2024 1:08pm

@TylerAPfledderer
Copy link
Collaborator

TylerAPfledderer commented Jan 22, 2024

@segunadebayo would this help address #7744?

@segunadebayo segunadebayo merged commit a89c598 into main Jan 31, 2024
@segunadebayo segunadebayo deleted the feat/custom-conditions branch January 31, 2024 22:23
segunadebayo added a commit that referenced this pull request May 8, 2024
…a plugin (#8310)

* Fix custom font code snippet typo on nextjs-pages-guide (#8240)

There's a small typo on the `_app.js` snippet for adding custom fonts with NextJS. This just fixes that to `return` the fragment instead of prefixing the fragment with a semicolon.

* feat: support custom conditions / psuedo props (#8218)

* chore: wip

* chore: update generated conditions

* docs: update changeset

* feat: add new pseudos

* feat(v3): remove social media colors (#8249)

* refactor(v3): simplify changelog (#8253)

* refactor(v3): simplify v1 changelog

* refactor(v3): simplify v2 changelog

* fix(deps): update dependency github-slugger to v1.5.0 (#8258)

* fix(deps): update dependency @docusaurus/utils to v2.4.3

* fix(deps): update dependency github-slugger to v1.5.0

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* docs: update edit url (#8276)

* fix(deps): update dependency framer-motion to v9.1.7 (#8257)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency @docusaurus/utils to v2.4.3 (#8256)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* docs: Add block about `styleType` to `List` documentation (#8278)

docs: add block about styleType to List documentation

* feat(v3): support `asChild` composition (#8302)

* feat: support as child composition

* refactor: simplify types

* chore: deprecate as props

* refactor: rename vars

* docs(website/gatsby-guide): update guide to include deprecating chakra plugin

---------

Co-authored-by: Samyok Nepal <nepalsamyok@gmail.com>
Co-authored-by: Segun Adebayo <joseshegs@gmail.com>
Co-authored-by: Michał Korczak <michal.k2001@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Taiga KATARAO <32538736+tarao1006@users.noreply.github.com>
Co-authored-by: Ivan Schedrovskiy <ltlaitoff@gmail.com>
@github-actions github-actions bot mentioned this pull request Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core team 🌼 This was created by the core team Type: Feature 🚀 Issue or PR that adds a feature or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants