-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
ref(ui): make "md" the new buttonBar gap default #95551
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
Conversation
so that we also have it available without chonk
and adapt the interface to accept the new theme values instead of space util numbers
as it's going to be the new default
natemoo-re
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usage changes all LGTM, just curious about the exact type implementation!
| // eslint-disable-next-line boundaries/element-types | ||
| import {space} from 'sentry/styles/space'; | ||
|
|
||
| type Gap = keyof Theme['space']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have our own Space type that doesn't rely on module augmentation from @emotion/react? This will be a large part of our component API surface moving forward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this just depends where we import theme from. not sure why exactly we augment the emotion types instead of having our own useTheme hook and Theme type 🤷
But yes, we can definitely streamline this type once we have more components that have a prop that needs space
Suspect IssuesThis pull request was deployed and Sentry observed the following issues: Did you find this useful? React with a 👍 or 👎 |
The `ButtonBar` component now: - takes spacing tokens as value for the `gap` prop - defaults to `gap=“md”`, as this were most of the usages That means places where we had `<ButtonBar gap=“1”>` are now just `<ButtonBar>`, whereas we need to pass `gap=“none”` explicitly in places where we want no spacing.
The
ButtonBarcomponent now:gappropgap=“md”, as this were most of the usagesThat means places where we had
<ButtonBar gap=“1”>are now just<ButtonBar>, whereas we need to passgap=“none”explicitly in places where we want no spacing.