Skip to content

Commit

Permalink
docs(Input): Include an example for passing props to input element (#…
Browse files Browse the repository at this point in the history
…4153)

* Include an example for passing props to input element

* move example to Usage section

Co-authored-by: Oleksandr Fediashov <[email protected]>
  • Loading branch information
aminpaks and layershifter authored Aug 9, 2021
1 parent a080eaf commit 26362aa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react'
import { Input } from 'semantic-ui-react'

const InputExampleInputElementProps = () => (
<Input placeholder='Search...'>
<input data-testid='my-input-1' />
</Input>
)

export default InputExampleInputElementProps
5 changes: 5 additions & 0 deletions docs/src/examples/elements/Input/Usage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ const InputUsageExamples = () => (
description='An input can be focused via a ref.'
examplePath='elements/Input/Usage/InputExampleRefFocus'
/>
<ComponentExample
title='Input Element'
description='You can pass props (specially data attributes) to input by including an input element in children.'
examplePath='elements/Input/Usage/InputExampleInputElementProps'
/>
<ComponentExample
title='Datalist'
description={
Expand Down

0 comments on commit 26362aa

Please sign in to comment.