From e28d1b45d5e4a734553dced3f6496f680df23a5a Mon Sep 17 00:00:00 2001 From: Josh Wooding <12938082+joshwooding@users.noreply.github.com> Date: Mon, 13 May 2024 08:26:03 +0100 Subject: [PATCH] type fixes --- .storybook/preview.tsx | 9 ++++----- .../core/stories/border-layout/border-layout.stories.tsx | 2 +- packages/core/stories/panel/panel.stories.tsx | 2 +- .../core/stories/split-layout/split-layout.stories.tsx | 4 ++-- packages/icons/stories/icon.qa.stories.tsx | 1 - .../lab/stories/layer-layout/layer-layout.stories.tsx | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index 6d536d651a3..6bed8c4c3cf 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -1,5 +1,4 @@ -import type { Parameters } from "@storybook/react"; -import type { GlobalTypes } from "@storybook/csf"; +import type { Parameters, GlobalTypes, ArgTypes } from "@storybook/types"; import "@salt-ds/theme/index.css"; import "@salt-ds/theme/css/theme-next.css"; import "@fontsource/open-sans/300.css"; @@ -141,9 +140,9 @@ export const globalTypes: GlobalTypes = { }, }; -// export const argTypes: ArgTypes = { -// ref: { control: { type: null } }, -// }; +export const argTypes: ArgTypes = { + ref: { control: false }, +}; export const parameters: Parameters = { actions: { argTypesRegex: "^on[A-Z].*" }, diff --git a/packages/core/stories/border-layout/border-layout.stories.tsx b/packages/core/stories/border-layout/border-layout.stories.tsx index d11a22d5c9b..4a0b736824a 100644 --- a/packages/core/stories/border-layout/border-layout.stories.tsx +++ b/packages/core/stories/border-layout/border-layout.stories.tsx @@ -17,7 +17,7 @@ export default { rowGap: { type: "number", }, - children: { control: { type: null } }, + children: { control: false }, }, } as Meta; diff --git a/packages/core/stories/panel/panel.stories.tsx b/packages/core/stories/panel/panel.stories.tsx index 2804aa5e853..2b2ab1001e4 100644 --- a/packages/core/stories/panel/panel.stories.tsx +++ b/packages/core/stories/panel/panel.stories.tsx @@ -28,7 +28,7 @@ All.args = { children:

This is a Panel

, }; All.argTypes = { - children: { control: { type: null } }, + children: { control: false }, }; export const Primary = Template.bind({}); diff --git a/packages/core/stories/split-layout/split-layout.stories.tsx b/packages/core/stories/split-layout/split-layout.stories.tsx index a8a71bbb01b..87c3d195c37 100644 --- a/packages/core/stories/split-layout/split-layout.stories.tsx +++ b/packages/core/stories/split-layout/split-layout.stories.tsx @@ -31,8 +31,8 @@ export default { gap: { type: "number", }, - endItem: { control: { type: null } }, - startItem: { control: { type: null } }, + endItem: { control: false }, + startItem: { control: false }, }, decorators: [ (Story) => ( diff --git a/packages/icons/stories/icon.qa.stories.tsx b/packages/icons/stories/icon.qa.stories.tsx index 4f0402bd018..b8a52fbe761 100644 --- a/packages/icons/stories/icon.qa.stories.tsx +++ b/packages/icons/stories/icon.qa.stories.tsx @@ -33,7 +33,6 @@ export const AllIcons: StoryFn = () => { gap: 8, padding: "12px 0", }} - key={size} > {allIcons.map((IconComponent, i) => ( diff --git a/packages/lab/stories/layer-layout/layer-layout.stories.tsx b/packages/lab/stories/layer-layout/layer-layout.stories.tsx index fcf031d4580..da122230e05 100644 --- a/packages/lab/stories/layer-layout/layer-layout.stories.tsx +++ b/packages/lab/stories/layer-layout/layer-layout.stories.tsx @@ -18,7 +18,7 @@ export default { component: LayerLayout, argTypes: { position: { - options: LAYER_POSITIONS, + options: Array.from(LAYER_POSITIONS), control: { type: "select" }, }, },