wethegit / component-library

WTC's internal React component library.
https://wethegit.github.io/component-library/
MIT License
0 stars 0 forks source link

[COMP] fix: Add missing component classnames #195

Closed andrewrubin closed 2 months ago

andrewrubin commented 2 months ago

[COMP] fix: Add missing component classnames

Description

A few components that use the buildBreakpointClassnames() function were missing their non-prefixed counterparts. This meant that you could not do something like <Flex justify="center"> because we only had breakpoint-prefixed classnames. I.e. you had to use the breakpoint object for these props to work.

Solution

Add one extra call to the SASS mixins which generate these classes, passing an empty string as a prefix. This applies to Column, Flex, and Text.

Additional Notes

Fixes #194

changeset-bot[bot] commented 2 months ago

🦋 Changeset detected

Latest commit: 056b08fb895fae67d3b1e65c40d754b8c0183934

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

This PR includes changesets to release 1 package | Name | Type | | -------------------- | ----- | | @wethegit/components | 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

andrewrubin commented 2 months ago

Thanks Nick!

One question, should we update the default values where align is used (Text, Row, etc) from an object to a string?

Discussed with ya on Slack — we'll leave the Stories as showing the object usage. Maybe there's a way to make a really custom argType that supports both types, inside the autodocs, but for now… ¯\_(ツ)_/¯