-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Collapse borders between buttons in outlined ButtonGroup #7005
base: develop
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
@# Button group | ||
|
||
__ButtonGroup__ arranges multiple buttons in a horizontal or vertical group. | ||
**ButtonGroup** arranges multiple buttons in a horizontal or vertical group. | ||
|
||
@reactExample ButtonGroupExample | ||
|
||
@## Usage | ||
|
||
Most of __ButtonGroup__'s props are also supported by __Button__ directly; setting these props on __ButtonGroup__ will | ||
Most of **ButtonGroup**'s props are also supported by **Button** directly; setting these props on **ButtonGroup** will | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Formatting changes were added here by prettier on editor save. |
||
apply the same value to all buttons in the group. Note that most modifiers, once enabled on the group, cannot be | ||
overridden on child buttons (due to the cascading nature of CSS). | ||
|
||
|
@@ -26,32 +26,33 @@ The component also supports all HTML `<div>` props. | |
|
||
@## Usage with popovers | ||
|
||
__Button__ elements inside a __ButtonGroup__ can trivially be wrapped with a [__Popover__](#core/components/popover) to | ||
create complex toolbars. | ||
**Button** elements inside a **ButtonGroup** can be wrapped with a [**Popover**](#core/components/popover) to create | ||
complex toolbars or to provide split button functionality, allowing the action of a **Button** to be changed. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think "split button" is the unique thing to call out here in the use with popovers section, maybe "menu button"? Also not sure about There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, fair! I originally modeled this after GitHub's own merge options button, which I've seen as a pretty common dropdown use pattern in other places. Totally fine with omitting this and leaving the docs as is if the example isn't adding value. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reverted 7776357 |
||
|
||
@reactExample ButtonGroupPopoverExample | ||
|
||
@## Flex layout | ||
|
||
__ButtonGroup__ renders a CSS inline flex row (or column if vertical) and provides some modifer props for common | ||
**ButtonGroup** renders a CSS inline flex row (or column if vertical) and provides some modifer props for common | ||
flexbox patterns: | ||
|
||
- Enable the `fill` prop on a button group to make all buttons expand equally to | ||
fill the available space. | ||
- Buttons will expand horizontally by default, or vertically if the `vertical` prop is enabled. | ||
- Add the class `Classes.FIXED` to individual buttons to revert them to their initial sizes. | ||
- Enable the `fill` prop on a button group to make all buttons expand equally to | ||
fill the available space. | ||
|
||
- Alternatively, enable the `fill` prop on specific buttons (instead of on the | ||
group) to expand them equally to fill the available space while other | ||
buttons retain their original sizes. | ||
- Buttons will expand horizontally by default, or vertically if the `vertical` prop is enabled. | ||
- Add the class `Classes.FIXED` to individual buttons to revert them to their initial sizes. | ||
|
||
- Alternatively, enable the `fill` prop on specific buttons (instead of on the | ||
group) to expand them equally to fill the available space while other | ||
buttons retain their original sizes. | ||
|
||
You can adjust the specific size of a button with the `flex-basis` or `width` CSS properties. | ||
|
||
@## Vertical layout | ||
|
||
Buttons in a vertical group all have the same width as the widest button in the group. | ||
|
||
Use the `alignText` prop to control icon and text alignment in the buttons. Set this prop on __ButtonGroup__ to affect | ||
Use the `alignText` prop to control icon and text alignment in the buttons. Set this prop on **ButtonGroup** to affect | ||
all buttons in the group, or set the prop on individual buttons directly. | ||
|
||
@## CSS API | ||
|
@@ -60,6 +61,7 @@ all buttons in the group, or set the prop on individual buttons directly. | |
<h5 class="@ns-heading"> | ||
|
||
Deprecated API: use [`<ButtonGroup>`](#core/components/button-group) | ||
|
||
</h5> | ||
|
||
CSS APIs for Blueprint components are considered deprecated, as they are verbose, error-prone, and they | ||
|
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.
Changes to this file include a subset of the same changes originally applied in #6966, but scoped only to the
outlined
ButtonGroup.