Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
27 changes: 13 additions & 14 deletions docs/app/Examples/elements/Input/States/index.js
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
8 changes: 4 additions & 4 deletions docs/app/Examples/elements/Input/Types/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'

const InputTypes = () => (
const InputTypesExamples = () => (
<ExampleSection title='Types'>
<ComponentExample
title='Input'
description='A standard input field'
examplePath='elements/Input/Types/InputInput'
description='A standard input field.'
examplePath='elements/Input/Types/InputExampleInput'
/>
</ExampleSection>
)

export default InputTypes
export default InputTypesExamples

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
Expand Up @@ -7,7 +7,7 @@ const options = [
{ text: 'Entire Site', value: 'site' },
]

const InputActionDropdown = () => (
const InputExampleActionDropdown = () => (
<Input
action={<Dropdown basic floating options={options} defaultValue='page' />}
icon='search'
Expand All @@ -16,4 +16,4 @@ const InputActionDropdown = () => (
/>
)

export default InputActionDropdown
export default InputExampleActionDropdown
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', labelPosition: 'right', icon: 'copy', content: 'Copy' }}
defaultValue='http://ww.short.url/c0opq'
/>
)

export default InputExampleActionLabeledButton
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ const options = [
{ text: 'Products', value: 'products' },
]

const InputActions = () => (
const InputExampleActions = () => (
<Input action>
<input type='text' placeholder='Search...' />
<Select compact options={options} defaultValue='articles' />
<Button type='submit'>Search</Button>
</Input>
)

export default InputActions
export default InputExampleActions
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,7 +1,7 @@
import React from 'react'
import { Icon, Input } from 'semantic-ui-react'

const InputIconChild = () => (
const InputExampleIconChild = () => (
<div>
<Input icon>
<input placeholder='Search...' />
Expand All @@ -16,4 +16,4 @@ const InputIconChild = () => (
</div>
)

export default InputIconChild
export default InputExampleIconChild
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', labelPosition: 'left', icon: 'cart', content: 'Checkout' }}
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
Expand Up @@ -7,12 +7,12 @@ const options = [
{ text: '.org', value: '.org' },
]

const InputRightLabeled = () => (
const InputExampleRightLabeled = () => (
<Input
label={<Dropdown defaultValue='.com' options={options} />}
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { Input } from 'semantic-ui-react'

const InputRightLabeledTag = () => (
const InputExampleRightLabeledTag = () => (
<Input
icon='tags'
iconPosition='left'
Expand All @@ -11,4 +11,4 @@ const InputRightLabeledTag = () => (
/>
)

export default InputRightLabeledTag
export default InputExampleRightLabeledTag
Loading