chore(ui-docs): add example code to input docs
This commit is contained in:
parent
bb4fbd6e50
commit
77090134d5
|
@ -57,14 +57,19 @@ You can add a template on the right-hand side of the input to guide the user's i
|
||||||
|
|
||||||
### Search
|
### Search
|
||||||
|
|
||||||
|
```vue-html
|
||||||
|
<Input search />
|
||||||
|
```
|
||||||
|
|
||||||
<Input search />
|
<Input search />
|
||||||
|
|
||||||
### Password
|
### Password
|
||||||
|
|
||||||
|
```vue-html
|
||||||
<Layout flex no-gap style="align-items:flex-end">
|
<Layout flex no-gap style="align-items:flex-end">
|
||||||
<Spacer v
|
<Spacer v
|
||||||
:size="80"
|
:size="80"
|
||||||
style="outline:1px solid red; align-self: baseline;"
|
style="align-self: baseline;"
|
||||||
/>
|
/>
|
||||||
<Input>
|
<Input>
|
||||||
<template #label>
|
<template #label>
|
||||||
|
@ -75,7 +80,7 @@ You can add a template on the right-hand side of the input to guide the user's i
|
||||||
<Layout flex no-gap style="align-items:flex-end">
|
<Layout flex no-gap style="align-items:flex-end">
|
||||||
<Spacer v
|
<Spacer v
|
||||||
:size="80"
|
:size="80"
|
||||||
style="outline:1px solid red; align-self: baseline;"
|
style="align-self: baseline;"
|
||||||
/>
|
/>
|
||||||
<Input password>
|
<Input password>
|
||||||
<template #label>
|
<template #label>
|
||||||
|
@ -83,3 +88,43 @@ You can add a template on the right-hand side of the input to guide the user's i
|
||||||
</template>
|
</template>
|
||||||
</Input>
|
</Input>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- Implement a component for baseline alignments like this -->
|
||||||
|
|
||||||
|
<Layout flex no-gap style="align-items:flex-end">
|
||||||
|
<Spacer v
|
||||||
|
:size="80"
|
||||||
|
style="align-self: baseline;"
|
||||||
|
/>
|
||||||
|
<Input>
|
||||||
|
<template #label>
|
||||||
|
User name
|
||||||
|
</template>
|
||||||
|
</Input>
|
||||||
|
</Layout>
|
||||||
|
<Layout flex no-gap style="align-items:flex-end">
|
||||||
|
<Spacer v
|
||||||
|
:size="80"
|
||||||
|
style="align-self: baseline;"
|
||||||
|
/>
|
||||||
|
<Input password>
|
||||||
|
<template #label>
|
||||||
|
Password
|
||||||
|
</template>
|
||||||
|
</Input>
|
||||||
|
</Layout>
|
||||||
|
|
||||||
|
## Fallthrough attributes
|
||||||
|
|
||||||
|
If you add attributes that are no props, they will be added to the component:
|
||||||
|
|
||||||
|
```vue-html
|
||||||
|
<Input required
|
||||||
|
field-id="password-field"
|
||||||
|
/>
|
||||||
|
```
|
||||||
|
|
||||||
|
<Input required
|
||||||
|
field-id="password-field"
|
||||||
|
/>
|
||||||
|
|
Loading…
Reference in New Issue