Skip to content

Commit

Permalink
ToolsPanelItem: change isShownByDefault to be optional, assign de…
Browse files Browse the repository at this point in the history
…fault `false` value
  • Loading branch information
ciampo committed Feb 9, 2023
1 parent 378ee00 commit 284c5ae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ This prop identifies the current item as being displayed by default. This means
it will show regardless of whether it has a value set or is toggled on in the
panel's menu.

- Required: Yes
- Required: No
- Default: `false`

### `label`: `string`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function useToolsPanelItem(
const {
className,
hasValue,
isShownByDefault,
isShownByDefault = false,
label,
panelId,
resetAllFilter = noop,
Expand Down
4 changes: 3 additions & 1 deletion packages/components/src/tools-panel/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ export type ToolsPanelItem = {
* This prop identifies the current item as being displayed by default. This
* means it will show regardless of whether it has a value set or is toggled
* on in the panel's menu.
*
* @default false
*/
isShownByDefault: boolean;
isShownByDefault?: boolean;
/**
* The supplied label is dual purpose. It is used as:
* 1. the human-readable label for the panel's dropdown menu
Expand Down

0 comments on commit 284c5ae

Please sign in to comment.