-
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.
Icon Component updated to v1 API (#343)
* chore(gitignore): add MacOS and JetBrains files * feat(Icon): update to v1 API * test(Icon): add and update tests for v1 * docs(Icon): add and update docs for v1 * refactor(Icon): update className usages to name * docs(Icon): complete todos * refactor(DocumentTitle): move to ComponentDoc
- Loading branch information
1 parent
8fa2f28
commit 2754a48
Showing
64 changed files
with
1,033 additions
and
188 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,7 @@ coverage/ | |
dist/ | ||
docs/build | ||
docs/app/docgenInfo.json | ||
dll/ | ||
dll | ||
|
||
.DS_Store | ||
.idea/ |
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 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 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 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 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 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 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
13 changes: 13 additions & 0 deletions
13
docs/app/Examples/elements/Icon/Groups/IconCornerGroupExample.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,13 @@ | ||
import React, { Component } from 'react' | ||
import { Icon } from 'stardust' | ||
|
||
export default class IconCornerGroupExample extends Component { | ||
render() { | ||
return ( | ||
<Icon.Group size='huge'> | ||
<Icon name='puzzle' /> | ||
<Icon corner name='add' /> | ||
</Icon.Group> | ||
) | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
docs/app/Examples/elements/Icon/Groups/IconIconGroupExample.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,13 @@ | ||
import React, { Component } from 'react' | ||
import { Icon } from 'stardust' | ||
|
||
export default class IconIconGroupExample extends Component { | ||
render() { | ||
return ( | ||
<Icon.Group size='huge'> | ||
<Icon size='big' name='thin circle' /> | ||
<Icon name='user' /> | ||
</Icon.Group> | ||
) | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
docs/app/Examples/elements/Icon/Groups/IconLoadingGroupExample.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,19 @@ | ||
import React, { Component } from 'react' | ||
import { Icon } from 'stardust' | ||
|
||
export default class IconLoadingGroupExample extends Component { | ||
render() { | ||
return ( | ||
<div> | ||
<Icon.Group size='huge'> | ||
<Icon size='big' color='red' name='dont' /> | ||
<Icon color='black' name='use' /> | ||
</Icon.Group> | ||
<Icon.Group size='huge'> | ||
<Icon loading size='big' name='sun' /> | ||
<Icon name='user' /> | ||
</Icon.Group> | ||
</div> | ||
) | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
docs/app/Examples/elements/Icon/Groups/IconTwitterGroupExample.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,16 @@ | ||
import React, { Component } from 'react' | ||
import { Header, Icon } from 'stardust' | ||
|
||
export default class IconTwitterGroupExample extends Component { | ||
render() { | ||
return ( | ||
<Header.H2> | ||
<Icon.Group size='large'> | ||
<Icon name='twitter' /> | ||
<Icon corner name='add' /> | ||
</Icon.Group> | ||
Add on Twitter | ||
</Header.H2> | ||
) | ||
} | ||
} |
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,28 @@ | ||
import React, { Component } from 'react' | ||
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' | ||
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' | ||
|
||
export default class IconGroupsExamples extends Component { | ||
render() { | ||
return ( | ||
<ExampleSection title='Groups'> | ||
<ComponentExample | ||
title='Icons' | ||
description='Several icons can be used together as a group' | ||
examplePath='elements/Icon/Groups/IconIconGroupExample' | ||
/> | ||
<ComponentExample | ||
examplePath='elements/Icon/Groups/IconLoadingGroupExample' | ||
/> | ||
<ComponentExample | ||
title='Corner Icon' | ||
description='A group of icons can display a smaller corner icon' | ||
examplePath='elements/Icon/Groups/IconCornerGroupExample' | ||
/> | ||
<ComponentExample | ||
examplePath='elements/Icon/Groups/IconTwitterGroupExample' | ||
/> | ||
</ExampleSection> | ||
) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
docs/app/Examples/elements/Icon/IconSet/IconCategoryExample.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,24 @@ | ||
import _ from 'lodash' | ||
import React, { PropTypes } from 'react' | ||
import { Grid, Icon } from 'stardust' | ||
|
||
const columns = (icons) => _.map(icons, icon => ( | ||
<Grid.Column key={icon} className='center aligned'> | ||
<Icon name={icon} style={{ fontSize: '2em' }} /> | ||
<div>{_.startCase(icon)}</div> | ||
</Grid.Column> | ||
)) | ||
|
||
const IconCategoryExample = ({ category }) => ( | ||
<Grid className='doubling five column'> | ||
{columns(category.icons)} | ||
</Grid> | ||
) | ||
|
||
IconCategoryExample.propTypes = { | ||
category: PropTypes.shape({ | ||
icons: PropTypes.array.isRequired, | ||
}), | ||
} | ||
|
||
export default IconCategoryExample |
Oops, something went wrong.