-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(Button): refactor to v1 structure
- Loading branch information
1 parent
b8c494f
commit 30f0d0a
Showing
57 changed files
with
652 additions
and
732 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
22 changes: 10 additions & 12 deletions
22
docs/app/Examples/elements/Button/Content/ButtonConditionalsExample.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,14 +1,12 @@ | ||
import React, { Component } from 'react' | ||
import React from 'react' | ||
import { Button } from 'stardust' | ||
|
||
export default class ButtonConditionalsExample extends Component { | ||
render() { | ||
return ( | ||
<Button.Group> | ||
<Button>Cancel</Button> | ||
<div className='or' /> | ||
<Button className='positive'>Save</Button> | ||
</Button.Group> | ||
) | ||
} | ||
} | ||
const ButtonConditionalsExample = () => ( | ||
<Button.Group> | ||
<Button>Cancel</Button> | ||
<div className='or' /> | ||
<Button positive>Save</Button> | ||
</Button.Group> | ||
) | ||
|
||
export default ButtonConditionalsExample |
23 changes: 0 additions & 23 deletions
23
docs/app/Examples/elements/Button/Content/ButtonContentExamples.js
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
import React from 'react' | ||
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' | ||
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' | ||
import { Message } from 'stardust' | ||
|
||
const ButtonContentExamples = () => ( | ||
<ExampleSection title='Content'> | ||
<ComponentExample | ||
title='Conditionals' | ||
description='Button groups can contain conditionals' | ||
examplePath='elements/Button/Content/ButtonConditionalsExample' | ||
> | ||
<Message warning> | ||
Or buttons can have their text localized, or adjusted by using the data-text attribute. | ||
If the size of the conditional changes you will need to adjust @orCircleSize. | ||
</Message> | ||
</ComponentExample> | ||
</ExampleSection> | ||
) | ||
|
||
export default ButtonContentExamples |
22 changes: 10 additions & 12 deletions
22
docs/app/Examples/elements/Button/Groups/ButtonButtonsExample.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,14 +1,12 @@ | ||
import React, { Component } from 'react' | ||
import React from 'react' | ||
import { Button } from 'stardust' | ||
|
||
export default class ButtonButtonsExample extends Component { | ||
render() { | ||
return ( | ||
<Button.Group> | ||
<Button>One</Button> | ||
<Button>Two</Button> | ||
<Button>Three</Button> | ||
</Button.Group> | ||
) | ||
} | ||
} | ||
const ButtonButtonsExample = () => ( | ||
<Button.Group> | ||
<Button>One</Button> | ||
<Button>Two</Button> | ||
<Button>Three</Button> | ||
</Button.Group> | ||
) | ||
|
||
export default ButtonButtonsExample |
22 changes: 10 additions & 12 deletions
22
docs/app/Examples/elements/Button/Groups/ButtonColoredButtonsExample.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,14 +1,12 @@ | ||
import React, { Component } from 'react' | ||
import React from 'react' | ||
import { Button } from 'stardust' | ||
|
||
export default class ButtonColoredButtonsExample extends Component { | ||
render() { | ||
return ( | ||
<Button.Group color='blue'> | ||
<Button>One</Button> | ||
<Button>Two</Button> | ||
<Button>Three</Button> | ||
</Button.Group> | ||
) | ||
} | ||
} | ||
const ButtonColoredButtonsExample = () => ( | ||
<Button.Group color='blue'> | ||
<Button>One</Button> | ||
<Button>Two</Button> | ||
<Button>Three</Button> | ||
</Button.Group> | ||
) | ||
|
||
export default ButtonColoredButtonsExample |
40 changes: 19 additions & 21 deletions
40
docs/app/Examples/elements/Button/Groups/ButtonEqualWidthsButtonsExample.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,23 +1,21 @@ | ||
import React, { Component } from 'react' | ||
import React from 'react' | ||
import { Button } from 'stardust' | ||
|
||
export default class ButtonEqualWidthsButtonsExample extends Component { | ||
render() { | ||
return ( | ||
<div> | ||
<Button.Group widths='five'> | ||
<Button>Overview</Button> | ||
<Button>Specs</Button> | ||
<Button>Warrantee</Button> | ||
<Button>Reviews</Button> | ||
<Button>Support</Button> | ||
</Button.Group> | ||
<Button.Group widths='three'> | ||
<Button>Overview</Button> | ||
<Button>Specs</Button> | ||
<Button>Support</Button> | ||
</Button.Group> | ||
</div> | ||
) | ||
} | ||
} | ||
const ButtonEqualWidthsButtonsExample = () => ( | ||
<div> | ||
<Button.Group widths='five'> | ||
<Button>Overview</Button> | ||
<Button>Specs</Button> | ||
<Button>Warrantee</Button> | ||
<Button>Reviews</Button> | ||
<Button>Support</Button> | ||
</Button.Group> | ||
<Button.Group widths='three'> | ||
<Button>Overview</Button> | ||
<Button>Specs</Button> | ||
<Button>Support</Button> | ||
</Button.Group> | ||
</div> | ||
) | ||
|
||
export default ButtonEqualWidthsButtonsExample |
42 changes: 0 additions & 42 deletions
42
docs/app/Examples/elements/Button/Groups/ButtonGroupsExamples.js
This file was deleted.
Oops, something went wrong.
22 changes: 10 additions & 12 deletions
22
docs/app/Examples/elements/Button/Groups/ButtonIconButtonsExample.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,14 +1,12 @@ | ||
import React, { Component } from 'react' | ||
import React from 'react' | ||
import { Button } from 'stardust' | ||
|
||
export default class ButtonIconButtonsExample extends Component { | ||
render() { | ||
return ( | ||
<Button.Group icon> | ||
<Button icon='save' /> | ||
<Button icon='delete' /> | ||
<Button icon='edit' /> | ||
</Button.Group> | ||
) | ||
} | ||
} | ||
const ButtonIconButtonsExample = () => ( | ||
<Button.Group icon> | ||
<Button icon='save' /> | ||
<Button icon='delete' /> | ||
<Button icon='edit' /> | ||
</Button.Group> | ||
) | ||
|
||
export default ButtonIconButtonsExample |
22 changes: 10 additions & 12 deletions
22
docs/app/Examples/elements/Button/Groups/ButtonLabeledIconButtonsExample.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,14 +1,12 @@ | ||
import React, { Component } from 'react' | ||
import React from 'react' | ||
import { Button } from 'stardust' | ||
|
||
export default class ButtonLabeledIconButtonsExample extends Component { | ||
render() { | ||
return ( | ||
<Button.Group vertical labeled='icon'> | ||
<Button icon='save'>Pause</Button> | ||
<Button icon='play'>Play</Button> | ||
<Button icon='shuffle'>Shuffle</Button> | ||
</Button.Group> | ||
) | ||
} | ||
} | ||
const ButtonLabeledIconButtonsExample = () => ( | ||
<Button.Group vertical labeled='icon'> | ||
<Button icon='save'>Pause</Button> | ||
<Button icon='play'>Play</Button> | ||
<Button icon='shuffle'>Shuffle</Button> | ||
</Button.Group> | ||
) | ||
|
||
export default ButtonLabeledIconButtonsExample |
24 changes: 11 additions & 13 deletions
24
docs/app/Examples/elements/Button/Groups/ButtonMixedGroupButtonsExample.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,15 +1,13 @@ | ||
import React, { Component } from 'react' | ||
import React from 'react' | ||
import { Button } from 'stardust' | ||
|
||
export default class ButtonMixedGroupButtonsExample extends Component { | ||
render() { | ||
return ( | ||
<Button.Group> | ||
<Button labeled='icon'>Feed</Button> | ||
<Button>Messages</Button> | ||
<Button>Events</Button> | ||
<Button>Photos</Button> | ||
</Button.Group> | ||
) | ||
} | ||
} | ||
const ButtonMixedGroupButtonsExample = () => ( | ||
<Button.Group> | ||
<Button labeled='icon'>Feed</Button> | ||
<Button>Messages</Button> | ||
<Button>Events</Button> | ||
<Button>Photos</Button> | ||
</Button.Group> | ||
) | ||
|
||
export default ButtonMixedGroupButtonsExample |
24 changes: 11 additions & 13 deletions
24
docs/app/Examples/elements/Button/Groups/ButtonVerticalButtonsExample.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,15 +1,13 @@ | ||
import React, { Component } from 'react' | ||
import React from 'react' | ||
import { Button } from 'stardust' | ||
|
||
export default class ButtonVerticalButtonsExample extends Component { | ||
render() { | ||
return ( | ||
<Button.Group vertical> | ||
<Button>Feed</Button> | ||
<Button>Messages</Button> | ||
<Button>Events</Button> | ||
<Button>Photos</Button> | ||
</Button.Group> | ||
) | ||
} | ||
} | ||
const ButtonVerticalButtonsExample = () => ( | ||
<Button.Group vertical> | ||
<Button>Feed</Button> | ||
<Button>Messages</Button> | ||
<Button>Events</Button> | ||
<Button>Photos</Button> | ||
</Button.Group> | ||
) | ||
|
||
export default ButtonVerticalButtonsExample |
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,40 @@ | ||
import React from 'react' | ||
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' | ||
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' | ||
|
||
const ButtonGroupsExamples = () => ( | ||
<ExampleSection title='Groups'> | ||
<ComponentExample | ||
title='Buttons' | ||
description='Buttons can exist together as a group' | ||
examplePath='elements/Button/Groups/ButtonButtonsExample' | ||
/> | ||
<ComponentExample | ||
title='Vertical Buttons' | ||
description='Groups can be formatted to appear vertically' | ||
examplePath='elements/Button/Groups/ButtonVerticalButtonsExample' | ||
/> | ||
<ComponentExample | ||
title='Icon Buttons' | ||
description='Button groups can show groups of icons' | ||
examplePath='elements/Button/Groups/ButtonIconButtonsExample' | ||
/> | ||
<ComponentExample | ||
title='Labeled Icon Buttons' | ||
description='Groups can be formatted as labeled icons' | ||
examplePath='elements/Button/Groups/ButtonLabeledIconButtonsExample' | ||
/> | ||
<ComponentExample | ||
title='Equal Widths' | ||
description='Groups can have their widths divided evenly' | ||
examplePath='elements/Button/Groups/ButtonEqualWidthsButtonsExample' | ||
/> | ||
<ComponentExample | ||
title='Colored Buttons' | ||
description='Groups can have a shared color' | ||
examplePath='elements/Button/Groups/ButtonColoredButtonsExample' | ||
/> | ||
</ExampleSection> | ||
) | ||
|
||
export default ButtonGroupsExamples |
Oops, something went wrong.