Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(forms): Add support for floating labels
- Loading branch information
Showing
17 changed files
with
56 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
stories/examples/FormProps.js → stories/examples/Form/FormProps.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from 'react'; | ||
import { Button, Form, FormGroup, Label, Input } from 'reactstrap'; | ||
|
||
const Example = (props) => { | ||
return ( | ||
<> | ||
<p>Wrap a pair of <code><Input></code> and <code><Label></code> components in <code><FormGroup floating></code> to enable floating labels with Bootstrap’s textual form fields. A <code>placeholder</code> is required on each <code><Input></code> as our method of CSS-only floating labels uses the <code>:placeholder-shown</code> pseudo-element. Also note that the <code><Input></code> must come first so we can utilize a sibling selector (e.g., <code>~</code>).</p> | ||
<Form inline> | ||
<FormGroup floating> | ||
<Input type="email" name="email" id="exampleEmail" placeholder="Email" /> | ||
<Label for="exampleEmail">Email</Label> | ||
</FormGroup> | ||
{' '} | ||
<FormGroup floating> | ||
<Input type="password" name="password" id="examplePassword" placeholder="Password" /> | ||
<Label for="examplePassword">Password</Label> | ||
</FormGroup> | ||
{' '} | ||
<Button>Submit</Button> | ||
</Form> | ||
</> | ||
); | ||
} | ||
|
||
export default Example; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters