Skip to content

Fix input action examples#305

Merged
levithomason merged 3 commits intomasterfrom
feature/fix-input-action-example
Jun 28, 2016
Merged

Fix input action examples#305
levithomason merged 3 commits intomasterfrom
feature/fix-input-action-example

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

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