(props)
| 2 | import { Button, Form, FormGroup, Label, Input } from 'reactstrap'; |
| 3 | |
| 4 | function Example(props) { |
| 5 | return ( |
| 6 | <> |
| 7 | <p> |
| 8 | Wrap a pair of <code><Input></code> and <code><Label></code>{' '} |
| 9 | components in <code><FormGroup floating></code> to enable floating |
| 10 | labels with Bootstrap’s textual form fields. A <code>placeholder</code>{' '} |
| 11 | is required on each <code><Input></code> as our method of CSS-only |
| 12 | floating labels uses the <code>:placeholder-shown</code> pseudo-element. |
| 13 | Also note that the <code><Input></code> must come first so we can |
| 14 | utilize a sibling selector (e.g., <code>~</code>). |
| 15 | </p> |
| 16 | <Form> |
| 17 | <FormGroup floating> |
| 18 | <Input |
| 19 | type="email" |
| 20 | name="email" |
| 21 | id="exampleEmail" |
| 22 | placeholder="Email" |
| 23 | /> |
| 24 | <Label for="exampleEmail">Email</Label> |
| 25 | </FormGroup>{' '} |
| 26 | <FormGroup floating> |
| 27 | <Input |
| 28 | type="password" |
| 29 | name="password" |
| 30 | id="examplePassword" |
| 31 | placeholder="Password" |
| 32 | /> |
| 33 | <Label for="examplePassword">Password</Label> |
| 34 | </FormGroup>{' '} |
| 35 | <Button>Submit</Button> |
| 36 | </Form> |
| 37 | </> |
| 38 | ); |
| 39 | } |
| 40 | |
| 41 | export default Example; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…