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(@kadena/ui): Add responsiveStyle and mapToProperty utility theme functions #1022

Merged
merged 7 commits into from
Oct 11, 2023

Conversation

eileenmguo
Copy link
Contributor

@eileenmguo eileenmguo commented Oct 10, 2023

While working on the grid component, I looked into how the vanilla-extract/css styles and found these utilities that I think can be useful for our codebase as well. I've added them and used them within some of our components and also applied them in the docs site in this PR. Curious to hear what you think!

responsiveStyle - This function takes a responsive object similar to sprinkles, but it allows users to group styles for a specific breakpoint together. It is just a utility for styling breakpoints, but I think it makes the code cleaner and more clear. Note that this will not work for sprinkles, only normal styles
mapToProperty - This function maps a value to a property, but also allows the user to specify a breakpoint. This can be helpful when making certain variants like in the grid component

If approved, I will apply this to the tools site as well

@changeset-bot
Copy link

changeset-bot bot commented Oct 10, 2023

🦋 Changeset detected

Latest commit: aae4059

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

This PR includes changesets to release 4 packages
Name Type
@kadena/react-ui Minor
@kadena/docs Patch
@kadena/graph-client Patch
@kadena/immutable-records 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
Copy link

vercel bot commented Oct 10, 2023

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

5 Ignored Deployments
Name Status Preview Comments Updated (UTC)
alpha-docs ⬜️ Ignored (Inspect) Visit Preview Oct 11, 2023 8:10am
docs-storybook ⬜️ Ignored (Inspect) Visit Preview Oct 11, 2023 8:10am
immutable-records ⬜️ Ignored (Inspect) Visit Preview Oct 11, 2023 8:10am
react-ui ⬜️ Ignored (Inspect) Visit Preview Oct 11, 2023 8:10am
tools ⬜️ Ignored (Inspect) Visit Preview Oct 11, 2023 8:10am

@eileenmguo eileenmguo merged commit 90c69ce into main Oct 11, 2023
4 checks passed
@eileenmguo eileenmguo deleted the feat/responsive-style-css branch October 11, 2023 08:17
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.

3 participants