Skip to content

Commit

Permalink
fix(quantity): fix storybook doc and demo to add default variant
Browse files Browse the repository at this point in the history
  • Loading branch information
manoncarbonnel authored and dpellier committed Mar 4, 2024
1 parent 700c313 commit d33e305
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ import VariantProperty from './properties/usage.variant.mdx';
### Size
<SizeProperty />

### Width
### Variant
<VariantProperty />

### Accessibility
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ import type { OsdsTable } from '../osds-table';
import { ODS_TABLE_SIZES } from '../constants/table-size';
import { ODS_TABLE_VARIANTS } from '../constants/table-variant';

/**
* common controller logic for table component used by the different implementations.
* it contains all the glue between framework implementation and the third party service.
*/
class OdsTableController {
protected component: OsdsTable;

Expand Down
9 changes: 7 additions & 2 deletions packages/storybook/stories/components/table/3_demo.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import { extractArgTypes, extractStoryParams, getTagAttributes } from '../../../

defineCustomElement();

const variants = {
default: '',
striped: ODS_TABLE_VARIANT.striped,
} as const;

/* Demo story parameters */
const storyParams = {
size: {
Expand Down Expand Up @@ -55,8 +60,8 @@ const storyParams = {
variant: {
category: 'Misc',
control: { type: 'select' },
defaultValue: ODS_TABLE_VARIANT.striped,
options: ODS_TABLE_VARIANTS,
defaultValue: variants.default,
options: variants,
},
};

Expand Down

0 comments on commit d33e305

Please sign in to comment.