From a581231d162add23e4793008463ac7f9250c67d9 Mon Sep 17 00:00:00 2001 From: Enrico Sacchetti Date: Fri, 19 Jan 2024 16:30:40 -0500 Subject: [PATCH] chore: adjust types - Fix ButtonSkeleton sizes - Apply v11 `size` props --- COMPONENT_INDEX.md | 10 +++++----- docs/src/COMPONENT_API.json | 6 +++--- docs/src/pages/components/Button.svx | 10 +++++----- src/Button/Button.svelte | 6 +----- src/Button/ButtonSkeleton.svelte | 22 ++++++++++++---------- types/Button/Button.svelte.d.ts | 2 +- types/Button/ButtonSkeleton.svelte.d.ts | 4 ++-- 7 files changed, 29 insertions(+), 31 deletions(-) diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index d0dca240..cc852148 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -376,7 +376,7 @@ export type BreakpointValue = 320 | 672 | 1056 | 1312 | 1584; | :--------------- | :------- | :--------------- | :------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ref | No | let | Yes | null | HTMLAnchorElement | HTMLButtonElement | null | Obtain a reference to the HTML element | | kind | No | let | No | "primary" | "secondary" | "tertiary" | "ghost" | "danger" | "danger--tertiary" | "danger--ghost" | "primary" | Specify the kind of button | -| size | No | let | No | "sm" | "md" | "lg" | "xl" | "2xl" | "default" | Specify the size of button | +| size | No | let | No | "sm" | "md" | "lg" | "xl" | "2xl" | "lg" | Specify the size of button | | expressive | No | let | No | boolean | false | Set to `true` to use Carbon's expressive typesetting | | isSelected | No | let | No | boolean | false | Set to `true` to enable the selected state for an icon-only, ghost button | | icon | No | let | No | typeof import("svelte").SvelteComponent | undefined | Specify the icon to render | @@ -429,10 +429,10 @@ None. ### Props -| Prop name | Required | Kind | Reactive | Type | Default value | Description | -| :-------- | :------- | :--------------- | :------- | ---------------------------------------------------------------------------- | ---------------------- | ------------------------------------ | -| href | No | let | No | string | undefined | Set the `href` to use an anchor link | -| size | No | let | No | "default" | "field" | "small" | "lg" | "xl" | "default" | Specify the size of button skeleton | +| Prop name | Required | Kind | Reactive | Type | Default value | Description | +| :-------- | :------- | :--------------- | :------- | ------------------------------------------------------------------ | ---------------------- | ------------------------------------ | +| href | No | let | No | string | undefined | Set the `href` to use an anchor link | +| size | No | let | No | "sm" | "md" | "lg" | "xl" | "2xl" | "lg" | Specify the size of button skeleton | ### Slots diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json index 6b977b30..9bfbd49e 100644 --- a/docs/src/COMPONENT_API.json +++ b/docs/src/COMPONENT_API.json @@ -466,7 +466,7 @@ "kind": "let", "description": "Specify the size of button", "type": "\"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\"", - "value": "\"default\"", + "value": "\"lg\"", "isFunction": false, "isFunctionDeclaration": false, "isRequired": false, @@ -704,8 +704,8 @@ "name": "size", "kind": "let", "description": "Specify the size of button skeleton", - "type": "\"default\" | \"field\" | \"small\" | \"lg\" | \"xl\"", - "value": "\"default\"", + "type": "\"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\"", + "value": "\"lg\"", "isFunction": false, "isFunctionDeclaration": false, "isRequired": false, diff --git a/docs/src/pages/components/Button.svx b/docs/src/pages/components/Button.svx index e6afd1a7..21039871 100644 --- a/docs/src/pages/components/Button.svx +++ b/docs/src/pages/components/Button.svx @@ -134,11 +134,11 @@ Use `buttonAttributes` to pass any additional attributes. ## Skeleton - +