Skip to content

Commit

Permalink
storybook: Remove setup controls link in event table (#672)
Browse files Browse the repository at this point in the history
storybook/fix-setup-controls-link
  • Loading branch information
ethanWallace authored Oct 22, 2024
1 parent e936818 commit c770a9d
Show file tree
Hide file tree
Showing 11 changed files with 70 additions and 113 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { eventProp } from '../../../utils/storybook/component-properties';

export default {
title: 'Components/Button',

Expand Down Expand Up @@ -115,27 +117,19 @@ export default {
// Events
gcdsClick: {
action: 'click',
table: {
category: 'Events | Événements',
},
...eventProp,
},
gcdsChange: {
action: 'change',
table: {
category: 'Events | Événements',
},
...eventProp,
},
gcdsFocus: {
action: 'focus',
table: {
category: 'Events | Événements',
},
...eventProp,
},
gcdsBlur: {
action: 'blur',
table: {
category: 'Events | Événements',
},
...eventProp,
},
},
};
Expand All @@ -149,7 +143,8 @@ const Template = args =>
args.size != 'regular' ? `size="${args.size}"` : null
} ${args.disabled ? `disabled` : null} ${
args.name ? `name="${args.name}"` : null
} ${ args.value ? `value="${args.value}"` : null
} ${
args.value ? `value="${args.value}"` : null
} ${args.type == 'link' && args.href ? `href="${args.href}"` : null} ${
args.type == 'link' && args.rel ? `rel="${args.rel}"` : null
} ${args.type == 'link' && args.target ? `target="${args.target}"` : null} ${
Expand All @@ -165,7 +160,8 @@ const Template = args =>
args.size != 'regular' ? `size="${args.size}"` : null
} ${args.disabled ? `disabled` : null} ${
args.name ? `name="${args.name}"` : null
} ${ args.value ? `value="${args.value}"` : null
} ${
args.value ? `value="${args.value}"` : null
} ${args.type == 'link' && args.href ? `href="${args.href}"` : null} ${
args.type == 'link' && args.rel ? `rel="${args.rel}"` : null
} ${args.type == 'link' && args.target ? `target="${args.target}"` : null} ${
Expand Down
42 changes: 16 additions & 26 deletions packages/web/src/components/gcds-card/stories/gcds-card.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { langProp } from '../../../utils/storybook/component-properties';
import {
langProp,
eventProp,
} from '../../../utils/storybook/component-properties';

export default {
title: 'Components/Card',
Expand Down Expand Up @@ -79,24 +82,18 @@ export default {
},
},

// Events
// Events
gcdsClick: {
action: 'click',
table: {
category: 'Events | Événements',
},
...eventProp,
},
gcdsFocus: {
action: 'focus',
table: {
category: 'Events | Événements',
},
...eventProp,
},
gcdsBlur: {
action: 'blur',
table: {
category: 'Events | Événements',
},
...eventProp,
},
},
};
Expand Down Expand Up @@ -155,8 +152,7 @@ Default.args = {
href: '#',
cardTitleTag: 'a',
badge: 'badge',
description:
'Description or supporting text relating to the headline.',
description: 'Description or supporting text relating to the headline.',
imgSrc: '',
imgAlt: '',
default: '',
Expand All @@ -169,8 +165,7 @@ Description.args = {
href: '#',
cardTitleTag: 'a',
badge: '',
description:
'Description or supporting text relating to the headline.',
description: 'Description or supporting text relating to the headline.',
imgSrc: '',
imgAlt: '',
default: '',
Expand All @@ -186,9 +181,8 @@ Slot.args = {
description: '',
imgSrc: '',
imgAlt: '',
default:
'Description or supporting text relating to the headline.',
lang: 'en',
default: 'Description or supporting text relating to the headline.',
lang: 'en',
};

export const Badge = Template.bind({});
Expand All @@ -197,8 +191,7 @@ Badge.args = {
href: '#',
cardTitleTag: 'a',
badge: 'Badge',
description:
'Description or supporting text relating to the headline.',
description: 'Description or supporting text relating to the headline.',
imgSrc: '',
imgAlt: '',
default: '',
Expand All @@ -211,8 +204,7 @@ Image.args = {
href: '#',
cardTitleTag: 'a',
badge: '',
description:
'Description or supporting text relating to the headline.',
description: 'Description or supporting text relating to the headline.',
imgSrc: 'https://picsum.photos/480/270',
imgAlt: 'An image with the card component',
default: '',
Expand All @@ -225,8 +217,7 @@ Props.args = {
href: '#',
cardTitleTag: 'a',
badge: 'badge',
description:
'Description or supporting text relating to the headline.',
description: 'Description or supporting text relating to the headline.',
imgSrc: '',
imgAlt: '',
default: '',
Expand All @@ -239,8 +230,7 @@ Playground.args = {
href: '#',
cardTitleTag: 'a',
badge: '',
description:
'Description or supporting text relating to the headline.',
description: 'Description or supporting text relating to the headline.',
imgSrc: '',
imgAlt: '',
default: '',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
langProp,
validatorProps,
eventProp,
} from '../../../utils/storybook/component-properties';

export default {
Expand Down Expand Up @@ -98,21 +99,15 @@ export default {
// Events
gcdsChange: {
action: 'change',
table: {
category: 'Events | Événements',
},
...eventProp,
},
gcdsFocus: {
action: 'focus',
table: {
category: 'Events | Événements',
},
...eventProp,
},
gcdsBlur: {
action: 'blur',
table: {
category: 'Events | Événements',
},
...eventProp,
},
},
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
langProp,
validatorProps,
eventProp,
} from '../../../utils/storybook/component-properties';

export default {
Expand Down Expand Up @@ -86,27 +87,19 @@ export default {
// Events
gcdsChange: {
action: 'change',
table: {
category: 'Events | Événements',
},
...eventProp,
},
gcdsInput: {
action: 'input',
table: {
category: 'Events | Événements',
},
...eventProp,
},
gcdsFocus: {
action: 'focus',
table: {
category: 'Events | Événements',
},
...eventProp,
},
gcdsBlur: {
action: 'blur',
table: {
category: 'Events | Événements',
},
...eventProp,
},
},
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
langProp,
validatorProps,
eventProp,
} from '../../../utils/storybook/component-properties';

export default {
Expand Down Expand Up @@ -73,15 +74,11 @@ export default {
// Events
gcdsGroupError: {
action: 'GroupError',
table: {
category: 'Events | Événements',
},
...eventProp,
},
gcdsGroupErrorClear: {
action: 'GroupErrorClear',
table: {
category: 'Events | Événements',
},
...eventProp,
},
},
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
langProp,
validatorProps,
eventProp,
} from '../../../utils/storybook/component-properties';

export default {
Expand Down Expand Up @@ -106,21 +107,15 @@ export default {
// Events
gcdsChange: {
action: 'change',
table: {
category: 'Events | Événements',
},
...eventProp,
},
gcdsFocus: {
action: 'focus',
table: {
category: 'Events | Événements',
},
...eventProp,
},
gcdsBlur: {
action: 'blur',
table: {
category: 'Events | Événements',
},
...eventProp,
},
},
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
langProp,
validatorProps,
eventProp,
} from '../../../utils/storybook/component-properties';

export default {
Expand Down Expand Up @@ -123,21 +124,15 @@ export default {
// Events
gcdsChange: {
action: 'change',
table: {
category: 'Events | Événements',
},
...eventProp,
},
gcdsFocus: {
action: 'focus',
table: {
category: 'Events | Événements',
},
...eventProp,
},
gcdsBlur: {
action: 'blur',
table: {
category: 'Events | Événements',
},
...eventProp,
},
},
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { langProp } from '../../../utils/storybook/component-properties';
import {
langProp,
eventProp,
} from '../../../utils/storybook/component-properties';

export default {
title: 'Components/Radio Group',
Expand Down Expand Up @@ -49,21 +52,15 @@ export default {
// Events
gcdsRadioChange: {
action: 'RadioChange',
table: {
category: 'Events | Événements',
},
...eventProp,
},
gcdsFocus: {
action: 'focus',
table: {
category: 'Events | Événements',
},
...eventProp,
},
gcdsBlur: {
action: 'blur',
table: {
category: 'Events | Événements',
},
...eventProp,
},
},
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
langProp,
validatorProps,
eventProp,
} from '../../../utils/storybook/component-properties';

export default {
Expand Down Expand Up @@ -99,21 +100,15 @@ export default {
// Events
gcdsChange: {
action: 'change',
table: {
category: 'Events | Événements',
},
...eventProp,
},
gcdsFocus: {
action: 'focus',
table: {
category: 'Events | Événements',
},
...eventProp,
},
gcdsBlur: {
action: 'blur',
table: {
category: 'Events | Événements',
},
...eventProp,
},
},
};
Expand Down
Loading

0 comments on commit c770a9d

Please sign in to comment.