From f3d4fe73cf5b41cee990a32d1dcfd5f0f3ee7178 Mon Sep 17 00:00:00 2001 From: Eric Y Liu Date: Sat, 26 Jun 2021 14:09:42 -0700 Subject: [PATCH] fix(ui-shell): default isSelected in HeaderNavItem to false --- COMPONENT_INDEX.md | 12 ++++++------ docs/src/COMPONENT_API.json | 2 ++ src/UIShell/GlobalHeader/HeaderNavItem.svelte | 2 +- types/UIShell/GlobalHeader/HeaderNavItem.d.ts | 3 ++- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index 71f41f16..418bc5df 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -1663,12 +1663,12 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :--------- | :--------------- | :------- | :----------------------------------------- | ----------------- | --------------------------------------------- | -| ref | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element | -| href | let | No | string | -- | Specify the `href` attribute | -| text | let | No | string | -- | Specify the text | -| isSelected | let | No | -- | -- | Set to `true` to select the item | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :--------- | :--------------- | :------- | :----------------------------------------- | ------------------ | --------------------------------------------- | +| ref | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element | +| href | let | No | string | -- | Specify the `href` attribute | +| text | let | No | string | -- | Specify the text | +| isSelected | let | No | boolean | false | Set to `true` to select the item | ### Slots diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json index a48f500c..ef039e51 100644 --- a/docs/src/COMPONENT_API.json +++ b/docs/src/COMPONENT_API.json @@ -4112,6 +4112,8 @@ "name": "isSelected", "kind": "let", "description": "Set to `true` to select the item", + "type": "boolean", + "value": "false", "isFunction": false, "constant": false, "reactive": false diff --git a/src/UIShell/GlobalHeader/HeaderNavItem.svelte b/src/UIShell/GlobalHeader/HeaderNavItem.svelte index 053a31a5..fb48da11 100644 --- a/src/UIShell/GlobalHeader/HeaderNavItem.svelte +++ b/src/UIShell/GlobalHeader/HeaderNavItem.svelte @@ -12,7 +12,7 @@ export let text = undefined; /** Set to `true` to select the item */ - export let isSelected = undefined; + export let isSelected = false; /** Obtain a reference to the HTML anchor element */ export let ref = null; diff --git a/types/UIShell/GlobalHeader/HeaderNavItem.d.ts b/types/UIShell/GlobalHeader/HeaderNavItem.d.ts index de003e7f..4144a4a6 100644 --- a/types/UIShell/GlobalHeader/HeaderNavItem.d.ts +++ b/types/UIShell/GlobalHeader/HeaderNavItem.d.ts @@ -15,8 +15,9 @@ export interface HeaderNavItemProps /** * Set to `true` to select the item + * @default false */ - isSelected?: undefined; + isSelected?: boolean; /** * Obtain a reference to the HTML anchor element