-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Button): add
buttons
shorthand to ButtonGroup
- Loading branch information
1 parent
f9348a2
commit b07e6d6
Showing
21 changed files
with
252 additions
and
86 deletions.
There are no files selected for viewing
30 changes: 22 additions & 8 deletions
30
docs/app/Examples/elements/Button/Groups/ButtonExampleGroupIcon.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
docs/app/Examples/elements/Button/Groups/ButtonExampleGroupIconShorthand.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from 'react' | ||
import { Button } from 'semantic-ui-react' | ||
|
||
const ButtonExampleGroupIconShorthand = () => ( | ||
<div> | ||
<Button.Group buttons={[ | ||
{ key: 'align left', icon: 'align left' }, | ||
{ key: 'align center', icon: 'align center' }, | ||
{ key: 'align right', icon: 'align right' }, | ||
{ key: 'align justify', icon: 'align justify' }, | ||
]} | ||
/> | ||
{' '} | ||
<Button.Group buttons={[ | ||
{ key: 'bold', icon: 'bold' }, | ||
{ key: 'underline', icon: 'underline' }, | ||
{ key: 'text width', icon: 'text width' }, | ||
]} | ||
/> | ||
</div> | ||
) | ||
|
||
export default ButtonExampleGroupIconShorthand |
8 changes: 8 additions & 0 deletions
8
docs/app/Examples/elements/Button/Groups/ButtonExampleGroupShorthand.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react' | ||
import { Button } from 'semantic-ui-react' | ||
|
||
const ButtonExampleGroupShorthand = () => ( | ||
<Button.Group buttons={['One', 'Two', 'Three']} /> | ||
) | ||
|
||
export default ButtonExampleGroupShorthand |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
docs/app/Examples/elements/Button/Types/ButtonExampleBasicShorthand.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from 'react' | ||
import { Button } from 'semantic-ui-react' | ||
|
||
const ButtonExampleBasicShorthand = () => ( | ||
<div> | ||
<Button content='Standard' basic /> | ||
<Button basic color='red' content='Red' /> | ||
<Button basic color='orange' content='Orange' /> | ||
<Button basic color='yellow' content='Yellow' /> | ||
<Button basic color='olive' content='Olive' /> | ||
<Button basic color='green' content='Green' /> | ||
<Button basic color='teal' content='Teal' /> | ||
<Button basic color='blue' content='Blue' /> | ||
<Button basic color='violet' content='Violet' /> | ||
<Button basic color='purple' content='Purple' /> | ||
<Button basic color='pink' content='Pink' /> | ||
<Button basic color='brown' content='Brown' /> | ||
<Button basic color='grey' content='Grey' /> | ||
<Button basic color='black' content='Black' /> | ||
</div> | ||
) | ||
|
||
export default ButtonExampleBasicShorthand |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
docs/app/Examples/elements/Button/Types/ButtonExampleEmphasisShorthand.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react' | ||
import { Button } from 'semantic-ui-react' | ||
|
||
const ButtonExampleEmphasisShorthand = () => ( | ||
<div> | ||
<Button content='Primary' primary /> | ||
<Button content='Secondary' secondary /> | ||
</div> | ||
) | ||
|
||
export default ButtonExampleEmphasisShorthand |
4 changes: 2 additions & 2 deletions
4
...nts/Button/Types/ButtonExampleIconProp.js → ...utton/Types/ButtonExampleIconShorthand.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import React from 'react' | ||
import { Button } from 'semantic-ui-react' | ||
|
||
const ButtonExampleIconProp = () => ( | ||
const ButtonExampleIconShorthand = () => ( | ||
<Button icon='world' /> | ||
) | ||
|
||
export default ButtonExampleIconProp | ||
export default ButtonExampleIconShorthand |
41 changes: 21 additions & 20 deletions
41
docs/app/Examples/elements/Button/Types/ButtonExampleLabeled.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 15 additions & 15 deletions
30
docs/app/Examples/elements/Button/Types/ButtonExampleLabeledBasic.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
docs/app/Examples/elements/Button/Types/ButtonExampleLabeledBasicShorthand.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from 'react' | ||
import { Button } from 'semantic-ui-react' | ||
|
||
const ButtonExampleLabeledBasicShorthand = () => ( | ||
<div> | ||
<Button | ||
color='red' | ||
content='Like' | ||
icon='heart' | ||
label={{ basic: true, color: 'red', pointing: 'left', content: '2,048' }} | ||
/> | ||
<Button | ||
basic | ||
color='blue' | ||
content='Fork' | ||
icon='fork' | ||
label={{ as: 'a', basic: true, color: 'blue', pointing: 'left', content: '2,048' }} | ||
/> | ||
</div> | ||
) | ||
|
||
export default ButtonExampleLabeledBasicShorthand |
12 changes: 9 additions & 3 deletions
12
docs/app/Examples/elements/Button/Types/ButtonExampleLabeledIcon.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
docs/app/Examples/elements/Button/Types/ButtonExampleLabeledIconShorthand.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react' | ||
import { Button } from 'semantic-ui-react' | ||
|
||
const ButtonExampleLabeledIconShorthand = () => ( | ||
<div> | ||
<Button content='Pause' icon='pause' labelPosition='left' /> | ||
<Button content='Next' icon='right arrow' labelPosition='right' /> | ||
</div> | ||
) | ||
|
||
export default ButtonExampleLabeledIconShorthand |
13 changes: 0 additions & 13 deletions
13
docs/app/Examples/elements/Button/Types/ButtonExampleLabeledProps.js
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
docs/app/Examples/elements/Button/Types/ButtonExampleLabeledShorthand.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React from 'react' | ||
import { Button } from 'semantic-ui-react' | ||
|
||
const ButtonExampleLabeledShorthand = () => ( | ||
<div> | ||
<Button | ||
content='Like' | ||
icon='heart' | ||
label={{ as: 'a', basic: true, content: '2,048' }} | ||
labelPosition='right' | ||
/> | ||
<Button | ||
content='Like' | ||
icon='heart' | ||
label={{ as: 'a', basic: true, pointing: 'right', content: '2,048' }} | ||
labelPosition='left' | ||
/> | ||
<Button | ||
icon='fork' | ||
label={{ as: 'a', basic: true, content: '2,048' }} | ||
labelPosition='left' | ||
/> | ||
</div> | ||
) | ||
|
||
export default ButtonExampleLabeledShorthand |
4 changes: 2 additions & 2 deletions
4
.../Button/Types/ButtonExampleContentProp.js → ...ts/Button/Types/ButtonExampleShorthand.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import React from 'react' | ||
import { Button } from 'semantic-ui-react' | ||
|
||
const ButtonExampleContentProp = () => ( | ||
const ButtonExampleShorthand = () => ( | ||
<Button content='Click Here' /> | ||
) | ||
|
||
export default ButtonExampleContentProp | ||
export default ButtonExampleShorthand |
Oops, something went wrong.