-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Conversation
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' |
There was a problem hiding this comment.
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.
Current coverage is 88.24%
|
@@ -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' /> |
There was a problem hiding this comment.
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.
* fix(Input): use _meta to identify action children * refactor(docs): use Select where possible
This PR fixes the broken input action examples on the doc site by avoiding references to mangled component function names:
Docs
This PR