-
Notifications
You must be signed in to change notification settings - Fork 4k
docs(Input): refactor, add trailing . in description, fix imports #679
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
Changes from 1 commit
2ed9db3
93bb166
c588185
4398632
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| import React from 'react' | ||
| import { Input } from 'semantic-ui-react' | ||
|
|
||
| const InputError = () => ( | ||
| const InputExampleError = () => ( | ||
| <Input error placeholder='Search...' /> | ||
| ) | ||
|
|
||
| export default InputError | ||
| export default InputExampleError |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| import React from 'react' | ||
| import { Input } from 'semantic-ui-react' | ||
|
|
||
| const InputFocus = () => ( | ||
| const InputExampleFocus = () => ( | ||
| <Input focus placeholder='Search...' /> | ||
| ) | ||
|
|
||
| export default InputFocus | ||
| export default InputExampleFocus |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| import React from 'react' | ||
| import { Input } from 'semantic-ui-react' | ||
|
|
||
| const InputLeftLoading = () => ( | ||
| const InputExampleLeftLoading = () => ( | ||
| <Input loading icon='user' iconPosition='left' placeholder='Search...' /> | ||
| ) | ||
|
|
||
| export default InputLeftLoading | ||
| export default InputExampleLeftLoading |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| import React from 'react' | ||
| import { Input } from 'semantic-ui-react' | ||
|
|
||
| const InputLoading = () => ( | ||
| const InputExampleLoading = () => ( | ||
| <Input loading icon='user' placeholder='Search...' /> | ||
| ) | ||
|
|
||
| export default InputLoading | ||
| export default InputExampleLoading |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,36 @@ | ||
| import React from 'react' | ||
| import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' | ||
| import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' | ||
| import { Message } from 'semantic-ui-react' | ||
|
|
||
| import { Message } from 'src' | ||
|
|
||
| const InputStates = () => ( | ||
| const InputStatesExamples = () => ( | ||
| <ExampleSection title='States'> | ||
| <ComponentExample | ||
| title='Focus' | ||
| description='An input field can show a user is currently interacting with it' | ||
| examplePath='elements/Input/States/InputFocus' | ||
| description='An input field can show a user is currently interacting with it.' | ||
| examplePath='elements/Input/States/InputExampleFocus' | ||
| /> | ||
| <ComponentExample | ||
| title='Loading' | ||
| description='An icon input field can show that it is currently loading data' | ||
| examplePath='elements/Input/States/InputLoading' | ||
| description='An icon input field can show that it is currently loading data.' | ||
| examplePath='elements/Input/States/InputExampleLoading' | ||
| > | ||
| <Message> | ||
| Loading inputs automatically modify the input's icon on loading state to show loading indication | ||
| Loading inputs automatically modify the input's icon on loading state to show loading indication. | ||
| </Message> | ||
| </ComponentExample> | ||
| <ComponentExample examplePath='elements/Input/States/InputLeftLoading' /> | ||
| <ComponentExample examplePath='elements/Input/States/InputExampleLeftLoading' /> | ||
| <ComponentExample | ||
| title='Disabled' | ||
| description='An input field can show that it is disabled' | ||
| examplePath='elements/Input/States/InputDisabled' | ||
| description='An input field can show that it is disabled.' | ||
| examplePath='elements/Input/States/InputExampleDisabled' | ||
| /> | ||
| <ComponentExample | ||
| title='Error' | ||
| description='An input field can show that the data contains errors' | ||
| examplePath='elements/Input/States/InputError' | ||
| description='An input field can show that the data contains errors.' | ||
| examplePath='elements/Input/States/InputExampleError' | ||
| /> | ||
| </ExampleSection> | ||
| ) | ||
|
|
||
| export default InputStates | ||
| export default InputStatesExamples |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| import React from 'react' | ||
| import { Input } from 'semantic-ui-react' | ||
|
|
||
| const InputInput = () => ( | ||
| const InputExampleInput = () => ( | ||
| <Input placeholder='Search...' /> | ||
| ) | ||
|
|
||
| export default InputInput | ||
| export default InputExampleInput |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| import React from 'react' | ||
| import { Input } from 'semantic-ui-react' | ||
|
|
||
| const InputAction = () => ( | ||
| const InputExampleAction = () => ( | ||
| <Input action='Search' placeholder='Search...' /> | ||
| ) | ||
|
|
||
| export default InputAction | ||
| export default InputExampleAction |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| import React from 'react' | ||
| import { Input } from 'semantic-ui-react' | ||
|
|
||
| const InputActionIconButton = () => ( | ||
| const InputExampleActionIconButton = () => ( | ||
| <Input action={{ icon: 'search' }} placeholder='Search...' /> | ||
| ) | ||
|
|
||
| export default InputActionIconButton | ||
| export default InputExampleActionIconButton |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import React from 'react' | ||
| import { Input } from 'semantic-ui-react' | ||
|
|
||
| const InputExampleActionLabeledButton = () => ( | ||
| <Input | ||
| action={{ color: 'teal', label: 'right', icon: 'copy', content: 'Copy' }} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The prop
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||
| defaultValue='http://ww.short.url/c0opq' | ||
| /> | ||
| ) | ||
|
|
||
| export default InputExampleActionLabeledButton | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| import React from 'react' | ||
| import { Input } from 'semantic-ui-react' | ||
|
|
||
| const InputFluid = () => ( | ||
| const InputExampleFluid = () => ( | ||
| <Input fluid icon='search' placeholder='Search...' /> | ||
| ) | ||
|
|
||
| export default InputFluid | ||
| export default InputExampleFluid |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| import React from 'react' | ||
| import { Input } from 'semantic-ui-react' | ||
|
|
||
| const InputIcon = () => ( | ||
| const InputExampleIcon = () => ( | ||
| <Input icon='search' placeholder='Search...' /> | ||
| ) | ||
|
|
||
| export default InputIcon | ||
| export default InputExampleIcon |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| import React from 'react' | ||
| import { Icon, Input } from 'semantic-ui-react' | ||
|
|
||
| const InputIconElement = () => ( | ||
| const InputExampleIconElement = () => ( | ||
| <Input | ||
| icon={<Icon name='search' inverted circular link />} | ||
| placeholder='Search...' | ||
| /> | ||
| ) | ||
|
|
||
| export default InputIconElement | ||
| export default InputExampleIconElement |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| import React from 'react' | ||
| import { Input } from 'semantic-ui-react' | ||
|
|
||
| const InputIconPosition = () => ( | ||
| const InputExampleIconPosition = () => ( | ||
| <Input icon='users' iconPosition='left' placeholder='Search users...' /> | ||
| ) | ||
|
|
||
| export default InputIconPosition | ||
| export default InputExampleIconPosition |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| import React from 'react' | ||
| import { Input } from 'semantic-ui-react' | ||
|
|
||
| const InputIconProps = () => ( | ||
| const InputExampleIconProps = () => ( | ||
| <Input | ||
| icon={{ name: 'search', circular: true, link: true }} | ||
| placeholder='Search...' | ||
| /> | ||
| ) | ||
|
|
||
| export default InputIconProps | ||
| export default InputExampleIconProps |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| import React from 'react' | ||
| import { Segment, Input } from 'semantic-ui-react' | ||
|
|
||
| const InputInverted = () => ( | ||
| const InputExampleInverted = () => ( | ||
| <Segment inverted> | ||
| <Input inverted placeholder='Search...' /> | ||
| </Segment> | ||
| ) | ||
|
|
||
| export default InputInverted | ||
| export default InputExampleInverted |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| import React from 'react' | ||
| import { Input } from 'semantic-ui-react' | ||
|
|
||
| const InputLabeled = () => ( | ||
| const InputExampleLabeled = () => ( | ||
| <Input label='http://' placeholder='mysite.com' /> | ||
| ) | ||
|
|
||
| export default InputLabeled | ||
| export default InputExampleLabeled |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import React from 'react' | ||
| import { Input } from 'semantic-ui-react' | ||
|
|
||
| const InputExampleLeftActionLabeledButton = () => ( | ||
| <Input | ||
| action={{ color: 'teal', label: true, icon: 'cart', content: 'Checkout' }} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The previous
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||
| actionPosition='left' | ||
| placeholder='Search...' | ||
| defaultValue='52.03' | ||
| /> | ||
| ) | ||
|
|
||
| export default InputExampleLeftActionLabeledButton | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,12 @@ | ||
| import React from 'react' | ||
| import { Input } from 'semantic-ui-react' | ||
|
|
||
| const InputLeftCornerLabeled = () => ( | ||
| const InputExampleLeftCornerLabeled = () => ( | ||
| <Input | ||
| label={{ icon: 'asterisk' }} | ||
| labelPosition='left corner' | ||
| placeholder='Search...' | ||
| /> | ||
| ) | ||
|
|
||
| export default InputLeftCornerLabeled | ||
| export default InputExampleLeftCornerLabeled |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,12 @@ | ||
| import React from 'react' | ||
| import { Input } from 'semantic-ui-react' | ||
|
|
||
| const InputLeftCornerLabeled = () => ( | ||
| const InputExampleLeftCornerLabeled = () => ( | ||
| <Input | ||
| label={{ icon: 'asterisk' }} | ||
| labelPosition='right corner' | ||
| placeholder='Search...' | ||
| /> | ||
| ) | ||
|
|
||
| export default InputLeftCornerLabeled | ||
| export default InputExampleLeftCornerLabeled |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,12 +7,12 @@ const options = [ | |
| { text: '.org', value: '.org' }, | ||
| ] | ||
|
|
||
| const InputRightLabeled = () => ( | ||
| const InputExampleRightLabeled = () => ( | ||
| <Input | ||
| label={<Dropdown defaultValue='.com' options={options} />} | ||
| label={<Dropdown selection defaultValue='.com' options={options} />} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| labelPosition='right' | ||
| placeholder='Find domain' | ||
| /> | ||
| ) | ||
|
|
||
| export default InputRightLabeled | ||
| export default InputExampleRightLabeled | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,12 @@ | ||
| import React from 'react' | ||
| import { Input } from 'semantic-ui-react' | ||
|
|
||
| const InputRightLabeledBasic = () => ( | ||
| const InputExampleRightLabeledBasic = () => ( | ||
| <Input | ||
| label={{ basic: true, content: 'kg' }} | ||
| labelPosition='right' | ||
| placeholder='Enter weight...' | ||
| /> | ||
| ) | ||
|
|
||
| export default InputRightLabeledBasic | ||
| export default InputExampleRightLabeledBasic |


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 a
selectionDropdown, reference: http://semantic-ui.com/elements/input#actionThere 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: