From d177e0c7c61845b516d4a361a21739bb6486b9b5 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 1 Apr 2022 19:03:42 +0200 Subject: chore: add a back to top component --- .../molecules/buttons/back-to-top.module.scss | 49 ++++++++++++++++++++++ .../molecules/buttons/back-to-top.stories.tsx | 41 ++++++++++++++++++ .../molecules/buttons/back-to-top.test.tsx | 10 +++++ src/components/molecules/buttons/back-to-top.tsx | 40 ++++++++++++++++++ 4 files changed, 140 insertions(+) create mode 100644 src/components/molecules/buttons/back-to-top.module.scss create mode 100644 src/components/molecules/buttons/back-to-top.stories.tsx create mode 100644 src/components/molecules/buttons/back-to-top.test.tsx create mode 100644 src/components/molecules/buttons/back-to-top.tsx (limited to 'src/components/molecules') diff --git a/src/components/molecules/buttons/back-to-top.module.scss b/src/components/molecules/buttons/back-to-top.module.scss new file mode 100644 index 0000000..1abf1f6 --- /dev/null +++ b/src/components/molecules/buttons/back-to-top.module.scss @@ -0,0 +1,49 @@ +@use "@styles/abstracts/functions" as fun; + +.wrapper { + a { + svg { + width: 100%; + } + + :global { + .arrow-head { + transform: translateY(30%) scale(1.1); + transition: all 0.45s ease-in-out 0s; + } + + .arrow-bar { + opacity: 0; + transform: translateY(30%) scaleY(0); + transition: transform 0.4s ease-in-out 0s, opacity 0.1s linear 0.4s; + } + } + + &:hover, + &:focus { + :global { + .arrow-head { + transform: translateY(0) scale(1); + } + + .arrow-bar { + opacity: 1; + transform: translateY(0) scaleY(1); + transition: transform 0.45s ease-in-out 0s; + } + } + + svg { + :global { + animation: pulse 1.2s ease-in-out 0.6s infinite; + } + } + } + + &:active { + svg { + animation-play-state: paused; + } + } + } +} diff --git a/src/components/molecules/buttons/back-to-top.stories.tsx b/src/components/molecules/buttons/back-to-top.stories.tsx new file mode 100644 index 0000000..f1a36e5 --- /dev/null +++ b/src/components/molecules/buttons/back-to-top.stories.tsx @@ -0,0 +1,41 @@ +import { ComponentMeta, ComponentStory } from '@storybook/react'; +import { IntlProvider } from 'react-intl'; +import BackToTopComponent from './back-to-top'; + +export default { + title: 'Molecules/Buttons', + component: BackToTopComponent, + argTypes: { + additionalClasses: { + control: { + type: 'text', + }, + description: 'Add additional classes to the button wrapper.', + type: { + name: 'string', + required: false, + }, + }, + target: { + control: { + type: 'text', + }, + description: 'An element id (without hashtag) to use as anchor.', + type: { + name: 'string', + required: true, + }, + }, + }, +} as ComponentMeta; + +const Template: ComponentStory = (args) => ( + + + +); + +export const BackToTop = Template.bind({}); +BackToTop.args = { + target: 'top', +}; diff --git a/src/components/molecules/buttons/back-to-top.test.tsx b/src/components/molecules/buttons/back-to-top.test.tsx new file mode 100644 index 0000000..2b3a0a9 --- /dev/null +++ b/src/components/molecules/buttons/back-to-top.test.tsx @@ -0,0 +1,10 @@ +import { render, screen } from '@test-utils'; +import BackToTop from './back-to-top'; + +describe('BackToTop', () => { + it('renders a BackToTop link', () => { + render(); + expect(screen.getByRole('link')).toHaveAccessibleName('Back to top'); + expect(screen.getByRole('link')).toHaveAttribute('href', '/#top'); + }); +}); diff --git a/src/components/molecules/buttons/back-to-top.tsx b/src/components/molecules/buttons/back-to-top.tsx new file mode 100644 index 0000000..f25d3e9 --- /dev/null +++ b/src/components/molecules/buttons/back-to-top.tsx @@ -0,0 +1,40 @@ +import ButtonLink from '@components/atoms/buttons/button-link'; +import Arrow from '@components/atoms/icons/arrow'; +import { FC } from 'react'; +import { useIntl } from 'react-intl'; +import styles from './back-to-top.module.scss'; + +type BackToTopProps = { + /** + * Add additional classes to the button wrapper. + */ + additionalClasses?: string; + /** + * An element id (without hashtag) to use as anchor. + */ + target: string; +}; + +/** + * BackToTop component + * + * Render a back to top link. + */ +const BackToTop: FC = ({ additionalClasses, target }) => { + const intl = useIntl(); + const linkName = intl.formatMessage({ + defaultMessage: 'Back to top', + description: 'BackToTop: link text', + id: 'm+SUSR', + }); + + return ( +
+ + + +
+ ); +}; + +export default BackToTop; -- cgit v1.2.3 From 2b70c89962a18f33995fcca762fed73fd5ce8f28 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 1 Apr 2022 22:46:07 +0200 Subject: chore: add labelled field component --- src/components/atoms/forms/field.stories.tsx | 12 +- src/components/atoms/forms/field.test.tsx | 20 ++- src/components/atoms/forms/field.tsx | 8 +- .../molecules/forms/labelled-field.stories.tsx | 180 +++++++++++++++++++++ .../molecules/forms/labelled-field.test.tsx | 19 +++ src/components/molecules/forms/labelled-field.tsx | 25 +++ 6 files changed, 250 insertions(+), 14 deletions(-) create mode 100644 src/components/molecules/forms/labelled-field.stories.tsx create mode 100644 src/components/molecules/forms/labelled-field.test.tsx create mode 100644 src/components/molecules/forms/labelled-field.tsx (limited to 'src/components/molecules') diff --git a/src/components/atoms/forms/field.stories.tsx b/src/components/atoms/forms/field.stories.tsx index 0406f10..02681e7 100644 --- a/src/components/atoms/forms/field.stories.tsx +++ b/src/components/atoms/forms/field.stories.tsx @@ -31,12 +31,9 @@ export default { type: 'text', }, description: 'Field id.', - table: { - category: 'Options', - }, type: { name: 'string', - required: false, + required: true, }, }, max: { @@ -70,12 +67,9 @@ export default { type: 'text', }, description: 'Field name.', - table: { - category: 'Options', - }, type: { name: 'string', - required: false, + required: true, }, }, placeholder: { @@ -171,6 +165,8 @@ const Template: ComponentStory = (args) => ( export const Field = Template.bind({}); Field.args = { + id: 'field-storybook', + name: 'field-storybook', setValue: () => null, value: '', }; diff --git a/src/components/atoms/forms/field.test.tsx b/src/components/atoms/forms/field.test.tsx index 5488220..a04a976 100644 --- a/src/components/atoms/forms/field.test.tsx +++ b/src/components/atoms/forms/field.test.tsx @@ -3,12 +3,28 @@ import Field from './field'; describe('Field', () => { it('renders a text input', () => { - render( null} />); + render( + null} + /> + ); expect(screen.getByRole('textbox')).toHaveAttribute('type', 'text'); }); it('renders a search input', () => { - render( null} />); + render( + null} + /> + ); expect(screen.getByRole('searchbox')).toHaveAttribute('type', 'search'); }); }); diff --git a/src/components/atoms/forms/field.tsx b/src/components/atoms/forms/field.tsx index 7d1ac93..513d2ba 100644 --- a/src/components/atoms/forms/field.tsx +++ b/src/components/atoms/forms/field.tsx @@ -1,7 +1,7 @@ import { ChangeEvent, FC, SetStateAction } from 'react'; import styles from './forms.module.scss'; -type FieldType = +export type FieldType = | 'datetime-local' | 'email' | 'number' @@ -12,7 +12,7 @@ type FieldType = | 'time' | 'url'; -type FieldProps = { +export type FieldProps = { /** * Field state. Either enabled (false) or disabled (true). */ @@ -20,7 +20,7 @@ type FieldProps = { /** * Field id attribute. */ - id?: string; + id: string; /** * Field maximum value. */ @@ -32,7 +32,7 @@ type FieldProps = { /** * Field name attribute. */ - name?: string; + name: string; /** * Placeholder value. */ diff --git a/src/components/molecules/forms/labelled-field.stories.tsx b/src/components/molecules/forms/labelled-field.stories.tsx new file mode 100644 index 0000000..eb7f8b5 --- /dev/null +++ b/src/components/molecules/forms/labelled-field.stories.tsx @@ -0,0 +1,180 @@ +import { ComponentMeta, ComponentStory } from '@storybook/react'; +import LabelledFieldComponent from './labelled-field'; + +export default { + title: 'Molecules/Forms', + component: LabelledFieldComponent, + args: { + disabled: false, + required: false, + }, + argTypes: { + disabled: { + control: { + type: 'boolean', + }, + description: 'Field state: either enabled or disabled.', + table: { + category: 'Options', + defaultValue: { summary: false }, + }, + type: { + name: 'boolean', + required: false, + }, + }, + id: { + control: { + type: 'text', + }, + description: 'Field id.', + type: { + name: 'string', + required: true, + }, + }, + label: { + control: { + type: 'text', + }, + description: 'Field label.', + type: { + name: 'string', + required: true, + }, + }, + max: { + control: { + type: 'number', + }, + description: 'Maximum value.', + table: { + category: 'Options', + }, + type: { + name: 'number', + required: false, + }, + }, + min: { + control: { + type: 'number', + }, + description: 'Minimum value.', + table: { + category: 'Options', + }, + type: { + name: 'number', + required: false, + }, + }, + name: { + control: { + type: 'text', + }, + description: 'Field name.', + type: { + name: 'string', + required: true, + }, + }, + placeholder: { + control: { + type: 'text', + }, + description: 'A placeholder value.', + table: { + category: 'Options', + }, + type: { + name: 'string', + required: false, + }, + }, + required: { + control: { + type: 'boolean', + }, + description: 'Determine if the field is required.', + table: { + category: 'Options', + defaultValue: { summary: false }, + }, + type: { + name: 'boolean', + required: false, + }, + }, + setValue: { + control: { + type: null, + }, + description: 'Callback function to set field value.', + table: { + category: 'Events', + }, + type: { + name: 'function', + required: true, + }, + }, + step: { + control: { + type: 'number', + }, + description: 'Field incremental values that are valid.', + table: { + category: 'Options', + }, + type: { + name: 'number', + required: false, + }, + }, + type: { + control: { + type: 'select', + }, + description: 'Field type: input type or textarea.', + options: [ + 'datetime-local', + 'email', + 'number', + 'search', + 'tel', + 'text', + 'textarea', + 'time', + 'url', + ], + type: { + name: 'string', + required: true, + }, + }, + value: { + control: { + type: 'text', + }, + description: 'Field value.', + type: { + name: 'string', + required: true, + }, + }, + }, +} as ComponentMeta; + +const Template: ComponentStory = (args) => ( + +); + +export const LabelledField = Template.bind({}); +LabelledField.args = { + id: 'labelled-field-storybook', + label: 'Labelled field', + name: 'labelled-field-storybook', + setValue: () => null, + value: '', +}; diff --git a/src/components/molecules/forms/labelled-field.test.tsx b/src/components/molecules/forms/labelled-field.test.tsx new file mode 100644 index 0000000..6fabe19 --- /dev/null +++ b/src/components/molecules/forms/labelled-field.test.tsx @@ -0,0 +1,19 @@ +import { render, screen } from '@test-utils'; +import LabelledField from './labelled-field'; + +describe('LabelledField', () => { + it('renders a labelled field', () => { + render( + null} + /> + ); + expect(screen.getByLabelText('Jest text field')).toBeInTheDocument(); + expect(screen.getByRole('textbox')).toHaveValue('test'); + }); +}); diff --git a/src/components/molecules/forms/labelled-field.tsx b/src/components/molecules/forms/labelled-field.tsx new file mode 100644 index 0000000..7f81e23 --- /dev/null +++ b/src/components/molecules/forms/labelled-field.tsx @@ -0,0 +1,25 @@ +import Field, { type FieldProps } from '@components/atoms/forms/field'; +import Label from '@components/atoms/forms/label'; +import { FC } from 'react'; + +type LabelledFieldProps = FieldProps & { + label: string; +}; + +const LabelledField: FC = ({ + id, + label, + required, + ...props +}) => { + return ( + <> + + + + ); +}; + +export default LabelledField; -- cgit v1.2.3 From 21eb67ef5e59d36b996392f60b5045f152a64604 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 1 Apr 2022 22:57:12 +0200 Subject: chore: add a labelled select field component --- src/components/atoms/forms/select.stories.tsx | 10 +- src/components/atoms/forms/select.tsx | 6 +- .../molecules/forms/labelled-select.stories.tsx | 127 +++++++++++++++++++++ .../molecules/forms/labelled-select.test.tsx | 25 ++++ src/components/molecules/forms/labelled-select.tsx | 25 ++++ 5 files changed, 182 insertions(+), 11 deletions(-) create mode 100644 src/components/molecules/forms/labelled-select.stories.tsx create mode 100644 src/components/molecules/forms/labelled-select.test.tsx create mode 100644 src/components/molecules/forms/labelled-select.tsx (limited to 'src/components/molecules') diff --git a/src/components/atoms/forms/select.stories.tsx b/src/components/atoms/forms/select.stories.tsx index 683e3b5..ed487f8 100644 --- a/src/components/atoms/forms/select.stories.tsx +++ b/src/components/atoms/forms/select.stories.tsx @@ -30,12 +30,9 @@ export default { type: 'text', }, description: 'Field id.', - table: { - category: 'Options', - }, type: { name: 'string', - required: false, + required: true, }, }, name: { @@ -43,12 +40,9 @@ export default { type: 'text', }, description: 'Field name.', - table: { - category: 'Options', - }, type: { name: 'string', - required: false, + required: true, }, }, options: { diff --git a/src/components/atoms/forms/select.tsx b/src/components/atoms/forms/select.tsx index 6e46660..e434a82 100644 --- a/src/components/atoms/forms/select.tsx +++ b/src/components/atoms/forms/select.tsx @@ -7,7 +7,7 @@ type SelectOptions = { value: string; }; -type SelectProps = { +export type SelectProps = { /** * Field state. Either enabled (false) or disabled (true). */ @@ -15,11 +15,11 @@ type SelectProps = { /** * Field id attribute. */ - id?: string; + id: string; /** * Field name attribute. */ - name?: string; + name: string; /** * True if the field is required. Default: false. */ diff --git a/src/components/molecules/forms/labelled-select.stories.tsx b/src/components/molecules/forms/labelled-select.stories.tsx new file mode 100644 index 0000000..0966e13 --- /dev/null +++ b/src/components/molecules/forms/labelled-select.stories.tsx @@ -0,0 +1,127 @@ +import { ComponentMeta, ComponentStory } from '@storybook/react'; +import LabelledSelectComponent from './labelled-select'; + +const selectOptions = [ + { id: 'option1', name: 'Option 1', value: 'option1' }, + { id: 'option2', name: 'Option 2', value: 'option2' }, + { id: 'option3', name: 'Option 3', value: 'option3' }, +]; + +export default { + title: 'Molecules/Forms', + component: LabelledSelectComponent, + args: { + disabled: false, + required: false, + }, + argTypes: { + disabled: { + control: { + type: 'boolean', + }, + description: 'Field state: either enabled or disabled.', + table: { + category: 'Options', + defaultValue: { summary: false }, + }, + type: { + name: 'boolean', + required: false, + }, + }, + id: { + control: { + type: 'text', + }, + description: 'Field id.', + type: { + name: 'string', + required: true, + }, + }, + label: { + control: { + type: 'text', + }, + description: 'Field label.', + type: { + name: 'string', + required: true, + }, + }, + name: { + control: { + type: 'text', + }, + description: 'Field name.', + type: { + name: 'string', + required: true, + }, + }, + options: { + control: { + type: null, + }, + description: 'Select options.', + type: { + name: 'array', + required: true, + value: { + name: 'string', + }, + }, + }, + required: { + control: { + type: 'boolean', + }, + description: 'Determine if the field is required.', + table: { + category: 'Options', + defaultValue: { summary: false }, + }, + type: { + name: 'boolean', + required: false, + }, + }, + setValue: { + control: { + type: null, + }, + description: 'Callback function to set field value.', + table: { + category: 'Events', + }, + type: { + name: 'function', + required: true, + }, + }, + value: { + control: { + type: 'text', + }, + description: 'Field value.', + type: { + name: 'string', + required: true, + }, + }, + }, +} as ComponentMeta; + +const Template: ComponentStory = (args) => ( + +); + +export const LabelledSelect = Template.bind({}); +LabelledSelect.args = { + id: 'labelled-select-storybook', + label: 'Labelled select', + name: 'labelled-select-storybook', + options: selectOptions, + setValue: () => null, + value: '', +}; diff --git a/src/components/molecules/forms/labelled-select.test.tsx b/src/components/molecules/forms/labelled-select.test.tsx new file mode 100644 index 0000000..9a50d6e --- /dev/null +++ b/src/components/molecules/forms/labelled-select.test.tsx @@ -0,0 +1,25 @@ +import { render, screen } from '@test-utils'; +import LabelledSelect from './labelled-select'; + +const selectOptions = [ + { id: 'option1', name: 'Option 1', value: 'option1' }, + { id: 'option2', name: 'Option 2', value: 'option2' }, + { id: 'option3', name: 'Option 3', value: 'option3' }, +]; + +describe('LabelledSelect', () => { + it('renders a labelled select', () => { + render( + null} + /> + ); + expect(screen.getByLabelText('Jest select field')).toBeInTheDocument(); + expect(screen.getByRole('combobox')).toHaveValue('option1'); + }); +}); diff --git a/src/components/molecules/forms/labelled-select.tsx b/src/components/molecules/forms/labelled-select.tsx new file mode 100644 index 0000000..442e91a --- /dev/null +++ b/src/components/molecules/forms/labelled-select.tsx @@ -0,0 +1,25 @@ +import Label from '@components/atoms/forms/label'; +import Select, { type SelectProps } from '@components/atoms/forms/select'; +import { FC } from 'react'; + +type LabelledSelectProps = SelectProps & { + label: string; +}; + +const LabelledSelect: FC = ({ + id, + label, + required, + ...props +}) => { + return ( + <> + + null} + /> + ); + expect(screen.getByRole('combobox')).toHaveValue(selected.value); + expect(screen.queryByRole('combobox')).not.toHaveValue( + selectOptions[1].value + ); + expect(screen.queryByRole('combobox')).not.toHaveValue( + selectOptions[2].value + ); + }); +}); diff --git a/src/components/atoms/forms/select.tsx b/src/components/atoms/forms/select.tsx index e434a82..a42dbda 100644 --- a/src/components/atoms/forms/select.tsx +++ b/src/components/atoms/forms/select.tsx @@ -1,13 +1,17 @@ import { ChangeEvent, FC, SetStateAction } from 'react'; import styles from './forms.module.scss'; -type SelectOptions = { +export type SelectOptions = { id: string; name: string; value: string; }; export type SelectProps = { + /** + * Set additional classes. + */ + classes?: string; /** * Field state. Either enabled (false) or disabled (true). */ @@ -43,7 +47,12 @@ export type SelectProps = { * * Render a HTML select element. */ -const Select: FC = ({ options, setValue, ...props }) => { +const Select: FC = ({ + classes = '', + options, + setValue, + ...props +}) => { /** * Update select value when an option is selected. * @param e - The option change event. @@ -65,7 +74,7 @@ const Select: FC = ({ options, setValue, ...props }) => { return ( + setIsTooltipOpened(!isTooltipOpened)} + classes={buttonModifier} + /> + + + ); +}; + +export default SelectWithTooltip; -- cgit v1.2.3 From a5df28fad0dae266a857ae110c43b3cb8b23c996 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 8 Apr 2022 19:41:40 +0200 Subject: refactor: use a consistent classname prop and avoid children prop I was using the FunctionComponent type for some component that do not use children. So I change the type to VoidFunctionComponent to avoid mistakes. I also rename all the "classes" or "additionalClasses" props to "className" to keep consistency between each components. --- src/components/atoms/buttons/button-link.tsx | 2 +- src/components/atoms/buttons/button.stories.tsx | 13 +++++++++++ src/components/atoms/buttons/button.tsx | 10 ++++----- src/components/atoms/buttons/buttons.module.scss | 4 ++++ src/components/atoms/forms/toggle.module.scss | 3 ++- src/components/atoms/forms/toggle.stories.tsx | 14 ++++++++++++ src/components/atoms/forms/toggle.tsx | 26 ++++++++++++++++------ src/components/atoms/headings/heading.stories.tsx | 14 ++++++------ src/components/atoms/headings/heading.tsx | 14 +++++++----- src/components/atoms/images/logo.stories.tsx | 15 +++++++++++++ src/components/atoms/images/logo.tsx | 4 ++-- src/components/atoms/links/link.stories.tsx | 13 +++++++++++ src/components/atoms/links/link.tsx | 14 +++++------- src/components/atoms/links/nav-link.tsx | 4 ++-- src/components/atoms/links/sharing-link.tsx | 4 ++-- src/components/atoms/links/social-link.tsx | 10 +++++---- .../atoms/lists/description-list.stories.tsx | 6 ++--- src/components/atoms/lists/description-list.tsx | 13 ++++++----- src/components/atoms/lists/list.stories.tsx | 6 ++--- src/components/atoms/lists/list.tsx | 15 +++++-------- .../atoms/loaders/progress-bar.stories.tsx | 8 ++++++- src/components/atoms/loaders/progress-bar.tsx | 10 ++++----- src/components/atoms/loaders/spinner.stories.tsx | 3 +++ src/components/atoms/loaders/spinner.tsx | 6 ++--- .../molecules/buttons/back-to-top.stories.tsx | 7 ++++-- src/components/molecules/buttons/back-to-top.tsx | 12 +++++----- .../molecules/buttons/help-button.stories.tsx | 4 ++-- src/components/molecules/buttons/help-button.tsx | 10 ++++----- .../molecules/images/responsive-image.tsx | 6 ++--- src/components/molecules/layout/branding.tsx | 10 ++++----- .../molecules/layout/flipping-logo.stories.tsx | 23 ++++++++++++++----- src/components/molecules/layout/flipping-logo.tsx | 12 +++++----- src/components/molecules/modals/modal.stories.tsx | 13 +++++++++++ src/components/molecules/modals/modal.tsx | 22 +++++++++++++----- .../molecules/modals/tooltip.stories.tsx | 23 +++++++++++++++++++ src/components/molecules/modals/tooltip.tsx | 15 ++++++++----- 36 files changed, 270 insertions(+), 118 deletions(-) (limited to 'src/components/molecules') diff --git a/src/components/atoms/buttons/button-link.tsx b/src/components/atoms/buttons/button-link.tsx index 47fe4b0..81229c8 100644 --- a/src/components/atoms/buttons/button-link.tsx +++ b/src/components/atoms/buttons/button-link.tsx @@ -2,7 +2,7 @@ import Link from 'next/link'; import { FC } from 'react'; import styles from './buttons.module.scss'; -type ButtonLinkProps = { +export type ButtonLinkProps = { /** * ButtonLink accessible label. */ diff --git a/src/components/atoms/buttons/button.stories.tsx b/src/components/atoms/buttons/button.stories.tsx index 9f4061b..1061d83 100644 --- a/src/components/atoms/buttons/button.stories.tsx +++ b/src/components/atoms/buttons/button.stories.tsx @@ -33,6 +33,19 @@ export default { required: true, }, }, + className: { + control: { + type: 'text', + }, + description: 'Set additional classnames to the button wrapper.', + table: { + category: 'Styles', + }, + type: { + name: 'string', + required: false, + }, + }, disabled: { control: { type: 'boolean', diff --git a/src/components/atoms/buttons/button.tsx b/src/components/atoms/buttons/button.tsx index ae4c894..b223046 100644 --- a/src/components/atoms/buttons/button.tsx +++ b/src/components/atoms/buttons/button.tsx @@ -3,9 +3,9 @@ import styles from './buttons.module.scss'; export type ButtonProps = { /** - * Add additional classes to the button wrapper. + * Set additional classnames to the button wrapper. */ - additionalClasses?: string; + className?: string; /** * Button accessible label. */ @@ -17,7 +17,7 @@ export type ButtonProps = { /** * Button kind. Default: secondary. */ - kind?: 'primary' | 'secondary' | 'tertiary'; + kind?: 'primary' | 'secondary' | 'tertiary' | 'neutral'; /** * A callback function to handle click. */ @@ -38,7 +38,7 @@ export type ButtonProps = { * Use a button as call to action. */ const Button: FC = ({ - additionalClasses, + className = '', ariaLabel, children, disabled = false, @@ -54,7 +54,7 @@ const Button: FC = ({