-
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
docs(Input): refactor, add trailing . in description, fix imports #679
Conversation
dpkwhan
commented
Oct 14, 2016
•
edited
Loading
edited
- refactor
- add trailing . in description
- fix imports
- fix wrong prop in Button
…x wrong props on Button and add required prop selection to Dropdown
Current coverage is 100% (diff: 100%)
|
<Input | ||
action={<Dropdown basic floating options={options} defaultValue='page' />} | ||
action={<Dropdown selection basic floating options={options} defaultValue='page' />} |
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 should not be aselection
Dropdown, reference: http://semantic-ui.com/elements/input#action
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.
I removed selection
, but it complains:
Warning: Failed prop type: `options` prop in `Dropdown` requires props: `selection`.
in Dropdown (created by InputExampleActionDropdown)
in InputExampleActionDropdown
|
||
const InputExampleActionLabeledButton = () => ( | ||
<Input | ||
action={{ color: 'teal', label: 'right', icon: 'copy', content: 'Copy' }} |
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.
The prop label
is for defining the label, the prop labelPosition
is for placing it on the left/right. This should be labelPosition: 'right'
.
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.
Fixed.
|
||
const InputExampleLeftActionLabeledButton = () => ( | ||
<Input | ||
action={{ color: 'teal', label: true, icon: 'cart', content: 'Checkout' }} |
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.
The previous labeled
prop became labelPosition
. This should be labelPosition: 'left'
which will place the icon
as a label on the left.
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.
Fixed.
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.
One more update please, then I think we can merge it.
<Input | ||
label={<Dropdown defaultValue='.com' options={options} />} | ||
label={<Dropdown selection defaultValue='.com' options={options} />} |
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.
@levithomason removed prop selection from Dropdown. Thank you for pointing this. |
Thanks much :) |