Add support for ButtonGroups to contain a single Button. (#9566)

Backports PR #9565

**Commit 1:**
Add support for ButtonGroups to contain a single Button.

* Original sha: 43eaa0546b
* Authored by CJ Cenizal <cj@cenizal.com> on 2016-12-19T23:00:38Z
This commit is contained in:
jasper 2016-12-19 18:04:09 -05:00 committed by CJ Cenizal
parent d8a9ed9bb8
commit dfd16c6868
3 changed files with 19 additions and 1 deletions

View file

@ -15,6 +15,13 @@
border-bottom-left-radius: 0;
}
> .kuiButton:only-child {
border-top-right-radius: $buttonBorderRadius;
border-bottom-right-radius: $buttonBorderRadius;
border-top-left-radius: $buttonBorderRadius;
border-bottom-left-radius: $buttonBorderRadius;
}
.kuiButton + .kuiButton {
margin-left: 2px;
}

View file

@ -35,7 +35,10 @@ export default createExample([{
}, {
title: 'ButtonGroup',
description: (
<p>Use the ButtonGroup to emphasize the relationships between a set of Buttons, and differentiate them from Buttons outside of the set.</p>
<div>
<p>Use the ButtonGroup to emphasize the relationships between a set of Buttons, and differentiate them from Buttons outside of the set.</p>
<p>They support containing a single Button, so that Buttons can be dynamically added and removed.</p>
</div>
),
html: require('./button_group.html'),
hasDarkTheme: false,

View file

@ -9,3 +9,11 @@
Option C
</button>
</div>
<hr class="guideBreak">
<div class="kuiButtonGroup">
<button class="kuiButton kuiButton--basic">
Button group with one button
</button>
</div>