-
Notifications
You must be signed in to change notification settings - Fork 842
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
Created compressed EuiButtonGroup #2343
Conversation
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.
Scanned the code and tested in browser.
Noticed the following hover glitch. I think you might always want to add a title to your example. If you're feeling ambitious, these might warrant their own example page at this point, so you could separate out the examples / snippets. It's getting busy.
Other than the glitch issue, I think this is mergeable and my comments are only suggestions.
border-width: 1px 0; | ||
// Offset the background color from the border by 1px | ||
padding: 1px; | ||
background-clip: content-box; |
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.
wut do?
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.
Added more to the comment above
|
||
export interface EuiButtonGroupIdToSelectedMap { | ||
[id: string]: boolean; | ||
} | ||
|
||
export type GroupButtonSize = 's' | 'm'; | ||
export type GroupButtonSize = 's' | 'm' | 'compressed'; |
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 you could get away with changing this to xs
to match the actual buton props. It, similarly, mostly changes the font size.
I know we're running into this a lot, and I'll throw my hands up the same way, but that's just a thought.
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.
Yeah I had considered this, but I think matching to the same name as the form compressed stuff will help connect the ideas that this should be used within compressed forms.
@snide I fixed the glitch @ryankeairns I updated the screenshot in the summary to match the styles we collaborated on. |
966fef0
to
3fa4367
Compare
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.
LGTM!
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.
LGTM. Thanks for the updates
To match our new compressed form controls
EuiButtonGroup's
buttonSize
prop now also acceptscompressed
. Which creates the following.I also beefed up the tests for EuiButtonGroup that only had one in it.
Checklist
[ ] Checked for breaking changes and labeled appropriately[ ] Checked for accessibility including keyboard-only and screenreader modes