Skip to content
Snippets Groups Projects
Commit 2987f8b2 authored by Sophie Richard's avatar Sophie Richard
Browse files

fix(doc): erreur duplication id stories toggle

parent 5e1e628e
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@
[(ngModel)]="value" />
<label
class="fr-toggle__label"
[attr.for]="inputId"
[for]="inputId"
[attr.data-fr-checked-label]="getDataLabelChecked()"
[attr.data-fr-unchecked-label]="getDataLabelUnchecked()">
<ng-container *ngIf="label">{{ label }}</ng-container>
......
import { dsfrDecorator, optionsPosition } from '.storybook/storybook-utils';
import { FormsModule } from '@angular/forms';
import { Meta, moduleMetadata, StoryObj } from '@storybook/angular';
import { DsfrSeverityConst } from '../../shared';
import { DsfrFormToggleComponent } from './form-toggle.component';
const meta: Meta = {
......@@ -9,7 +10,7 @@ const meta: Meta = {
decorators: [moduleMetadata({ imports: [FormsModule] })],
argTypes: {
labelPosition: { control: 'inline-radio', options: optionsPosition },
severity: { control: { type: 'inline-radio' } },
messageSeverity: { control: 'inline-radio', options: Object.values(DsfrSeverityConst) },
value: { control: { type: 'boolean' } },
id: { table: { disable: true } },
error: { table: { disable: true } },
......@@ -43,7 +44,6 @@ export const Hint: Story = {
...Default.args,
hint: 'Texte de description additionnel',
showSeparator: false,
inputId: 'foobar',
},
};
......@@ -83,7 +83,7 @@ export const Error: Story = {
decorators: dsfrDecorator('Toggle en erreur'),
args: {
...Default.args,
messageSeverity: 'error',
messageSeverity: 'success',
message: 'Texte d’erreur obligatoire',
},
};
......@@ -94,6 +94,7 @@ export const Valid: Story = {
...Default.args,
messageSeverity: 'success',
message: 'Texte de validation',
inputId: 'valid-toggle',
},
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment