Skip to content

Commit

Permalink
update form stories
Browse files Browse the repository at this point in the history
  • Loading branch information
xav-car committed Mar 14, 2024
1 parent 2212d0b commit 332e089
Showing 1 changed file with 28 additions and 21 deletions.
49 changes: 28 additions & 21 deletions app/stories/form.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,75 +10,82 @@ export const form = (args) => {
template: hbs`<form>
<PixInput
@id='firstName'
@label='Prénom'
@errorMessage={{this.genericErrorMessage}}
@requiredLabel='champ obligatoire'
@validationStatus={{this.validationStatus}}
/>
>
<:label>Prénom</:label>
</PixInput>
<br />
<PixInputPassword
@id='password'
@label='Mot de passe'
@errorMessage={{this.genericErrorMessage}}
/>
<PixInputPassword @id='password' @errorMessage={{this.genericErrorMessage}}>
<:label>Mot de passe</:label>
</PixInputPassword>
<br />
<PixMultiSelect
@innerText='Votre notation en étoiles...'
@id='form__pix-multi-select'
@label='A quel point aimez-vous Pix UI ?'
@onSelect={{this.onSelect}}
@selected={{this.selected}}
@options={{this.options}}
as |star|
>
<PixStars @count={{star.value}} @total={{star.total}} />
<:label>A quel point aimez-vous Pix UI ?</:label>
<:default as |star|>
<PixStars @count={{star.value}} @total={{star.total}} />
</:default>
</PixMultiSelect>
<br /><br />
<PixMultiSelect
@innerText='Mes condiments'
@id='form__pix-multi-select-searchable'
@label='Choississez vos condiments'
@onSelect={{this.onSelect}}
@selected={{this.selected}}
@isSearchable={{true}}
@options={{this.optionsSearch}}
as |condiment|
>
{{condiment.label}}
<:label>Choississez vos condiments</:label>
<:default as |condiment|>
{{condiment.label}}
</:default>
</PixMultiSelect>
<br /><br />
{{! template-lint-disable no-inline-styles }}
<PixSelect
@id='form__searchable-pix-select'
@label='Votre fruit préféré est : '
@options={{this.selectOptions}}
@isSearchable={{true}}
@isValidationActive={{true}}
placeholder='Fraises, Mangues...'
style='width:100%'
/>
>
<:label>Votre fruit préféré est :</:label>
</PixSelect>
<br />
<PixTextarea
@id='form__pix-textarea'
@value=''
@maxlength={{200}}
@label='Un commentaire ?'
@requiredLabel='Champ obligatoire'
@errorMessage={{this.genericErrorMessage}}
/>
>
<:label>Un commentaire ?</:label>
</PixTextarea>
<br />
<label class='pix-form__label'> Votre légume préféré est : </label>
<PixRadioButton @label='Chou' @value='chou' name='légume' />
<PixRadioButton @label='Carotte' @value='carotte' name='légume' />
<PixRadioButton @value='chou' name='légume'>
<:label>Chou</:label>
</PixRadioButton>
<PixRadioButton @value='carotte' name='légume'>
<:label>Carotte</:label>
</PixRadioButton>
<br />
<PixCheckbox @id='spam-pub' @labelSize='small'>
Acceptez-vous de vous faire spammer de PUB ?
<:label>Acceptez-vous de vous faire spammer de PUB ?</:label>
</PixCheckbox>
<br /><br />
Expand Down

0 comments on commit 332e089

Please sign in to comment.