From c70b75c61fa591350a134d9264118c123bfdf532 Mon Sep 17 00:00:00 2001 From: thaytharma Date: Tue, 25 Jun 2024 10:46:53 +0200 Subject: [PATCH 1/2] docs(Button): add 'small' button size as supported --- .../src/docs/uilib/components/button/properties.mdx | 2 +- packages/dnb-eufemia/src/components/button/Button.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/dnb-design-system-portal/src/docs/uilib/components/button/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/components/button/properties.mdx index 68d1760a8e2..27ae8bb31d9 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/components/button/properties.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/components/button/properties.mdx @@ -10,7 +10,7 @@ showTabs: true | `text` or `children` | _(optional)_ the content of the button can be a string or a React Element. | | `title` | _(optional)_ title of the button. Optional, but should always be included because of accessibility. | | `variant` | _(optional)_ defines the kind of button. Possible values are `primary`, `secondary`, `tertiary` and `signal`. Defaults to `primary` (or `secondary` if icon only). | -| `size` | _(optional)_ the size of the button. For now there is **medium**, **default** and **large**. | +| `size` | _(optional)_ the size of the button. For now there is **small**, **medium**, **default** and **large**. | | `icon` | _(optional)_ to be included in the button. [Primary Icons](/icons/primary) can be set as a string (e.g. `icon="chevron_right"`), other icons should be set as React elements. | | `icon_position` | _(optional)_ position of icon inside the button. Set to `left` or `right`. Tertiary button variant also supports `top`. Defaults to `right` if not set. | | `icon_size` | _(optional)_ define icon width and height. Defaults to 16px. | diff --git a/packages/dnb-eufemia/src/components/button/Button.d.ts b/packages/dnb-eufemia/src/components/button/Button.d.ts index 81ef447c487..d5ca09da0e9 100644 --- a/packages/dnb-eufemia/src/components/button/Button.d.ts +++ b/packages/dnb-eufemia/src/components/button/Button.d.ts @@ -60,7 +60,7 @@ export type ButtonProps = { */ variant?: ButtonVariant; /** - * The size of the button. For now there is "medium", "default" and "large". + * The size of the button. For now there is "small", "medium", "default" and "large". */ size?: ButtonSize; /** From 0b5fbdc1c3469728d6a8382a6aec15d7291a973b Mon Sep 17 00:00:00 2001 From: -l Date: Tue, 25 Jun 2024 12:43:47 +0200 Subject: [PATCH 2/2] chore: format with prettier --- .../src/docs/uilib/components/button/properties.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/dnb-design-system-portal/src/docs/uilib/components/button/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/components/button/properties.mdx index 27ae8bb31d9..f6db516aee0 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/components/button/properties.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/components/button/properties.mdx @@ -10,7 +10,7 @@ showTabs: true | `text` or `children` | _(optional)_ the content of the button can be a string or a React Element. | | `title` | _(optional)_ title of the button. Optional, but should always be included because of accessibility. | | `variant` | _(optional)_ defines the kind of button. Possible values are `primary`, `secondary`, `tertiary` and `signal`. Defaults to `primary` (or `secondary` if icon only). | -| `size` | _(optional)_ the size of the button. For now there is **small**, **medium**, **default** and **large**. | +| `size` | _(optional)_ the size of the button. For now there is **small**, **medium**, **default** and **large**. | | `icon` | _(optional)_ to be included in the button. [Primary Icons](/icons/primary) can be set as a string (e.g. `icon="chevron_right"`), other icons should be set as React elements. | | `icon_position` | _(optional)_ position of icon inside the button. Set to `left` or `right`. Tertiary button variant also supports `top`. Defaults to `right` if not set. | | `icon_size` | _(optional)_ define icon width and height. Defaults to 16px. |