Skip to content
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

Fix input action examples #305

Merged
merged 3 commits into from
Jun 28, 2016
Merged

Conversation

levithomason
Copy link
Member

@levithomason levithomason commented Jun 28, 2016

This PR fixes the broken input action examples on the doc site by avoiding references to mangled component function names:

Docs

image

This PR

image

const isLabel = _.isString(child.props.className) && !!child.props.className.match(/ui.*label$/)
const childIsAction = !isLabel && isButton || isDropdown
const isAction = _.includes(['Button', 'Dropdown', 'Select'], child.type._meta.name)
const isLabel = child.type._meta.name === 'Label'
Copy link
Member Author

@levithomason levithomason Jun 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This component is being updated in #281, however, this change was made now so the docs aren't broken. The _meta is used to identify the component as the function names are mangled in production.

@codecov-io
Copy link

codecov-io commented Jun 28, 2016

Current coverage is 88.24%

No coverage report found for master at c34a1a3.

Powered by Codecov. Last updated by c34a1a3...8b00b0f

@@ -10,7 +10,7 @@ export default class InputActionExample extends Component {
]
return (
<Input className='left icon action' icon='search' placeholder='Search...'>
<Dropdown compact selection options={options} defaultValue='articles' />
<Select compact options={options} defaultValue='articles' />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use select components where possible.

@levithomason levithomason merged commit 3ea4804 into master Jun 28, 2016
@levithomason levithomason deleted the feature/fix-input-action-example branch June 28, 2016 08:10
jhchill666 pushed a commit to jhchill666/stardust that referenced this pull request Jul 5, 2016
* fix(Input): use _meta to identify action children

* refactor(docs): use Select where possible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants