Merge pull request #699 from ing-bank/fix/buttons-within-lion-field-story
fix(form-system): buttons within fields story
This commit is contained in:
commit
e6a3ade004
1 changed files with 5 additions and 3 deletions
|
|
@ -2,16 +2,18 @@ import { Story, Meta, html } from '@open-wc/demoing-storybook';
|
|||
import '@lion/input/lion-input.js';
|
||||
import '@lion/button/lion-button.js';
|
||||
|
||||
<Meta title="Forms/System/Field integrations" />
|
||||
|
||||
# Content inside fields
|
||||
|
||||
Due to our custom inputs being Web Components, it is possible to put HTML content inside an input.
|
||||
For example if you want to add a button as a prefix or suffix.
|
||||
|
||||
<Story name="Buttons Within lion fields">
|
||||
<Story name="Buttons within fields">
|
||||
{html`
|
||||
<lion-input label="Prefix and sufix">
|
||||
<lion-button slot="prefix" type="button">prefix</lion-button>
|
||||
<lion-button slot="suffix" type="button">sufix</lion-button>
|
||||
<lion-button slot="suffix" type="button">suffix</lion-button>
|
||||
</lion-input>
|
||||
`}
|
||||
</Story>
|
||||
|
|
@ -19,6 +21,6 @@ For example if you want to add a button as a prefix or suffix.
|
|||
```html
|
||||
<lion-input label="Prefix and sufix">
|
||||
<lion-button slot="prefix" type="button">prefix</lion-button>
|
||||
<lion-button slot="suffix" type="button">sufix</lion-button>
|
||||
<lion-button slot="suffix" type="button">suffix</lion-button>
|
||||
</lion-input>
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in a new issue