docs: add new component docs

This commit is contained in:
Eric Liu 2020-10-02 20:13:02 -07:00
commit 2008d0035f
130 changed files with 6662 additions and 3801 deletions

View file

@ -0,0 +1,38 @@
<script>
import { PasswordInput } from "carbon-components-svelte";
import Preview from "../../components/Preview.svelte";
</script>
### Default
<PasswordInput labelText="Password" placeholder="Enter password..." />
### Password is visible
Set prop `type` to `"text"` to toggle password visibility.
<PasswordInput labelText="Password" type="text" placeholder="Enter password..." value="as_lta0890sdfpo__!9901" />
### Hidden label
<PasswordInput hideLabel labelText="Password" placeholder="Enter password..." />
### Light variant
<PasswordInput light labelText="Password" placeholder="Enter password..." />
### Extra-large size
<PasswordInput size="xl" labelText="Password" placeholder="Enter password..." />
### Small size
<PasswordInput size="sm" labelText="Password" placeholder="Enter password..." />
### Invalid state
<PasswordInput invalid invalidText="Incorrect user name or password." labelText="Password" placeholder="Enter password..." />
### Disabled state
<PasswordInput disabled labelText="Password" placeholder="Enter password..." />