Skip to content

Commit de4b0a8

Browse files
committed
fix: resolve type errors in storybook asset showcases and data-grid story
1 parent a1d6f73 commit de4b0a8

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

examples/src/storybook/assets/icon-showcase.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type Icon = FC<AxisIconProps> & { displayName: string };
88

99
const PREVIEW_FONT_SIZE = 32;
1010

11-
const icons: Icon[] = Object.values(AxisIcons)
11+
const icons: Icon[] = (Object.values(AxisIcons) as unknown[])
1212
.filter(
1313
(value): value is Icon =>
1414
typeof value === "function" &&

examples/src/storybook/assets/illustration-showcase.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ type Illustration = FC<AxisIllustrationProps> & { displayName: string };
88
const SVG_DATA_URI_PREFIX = "data:image/svg+xml;utf8,";
99
const PREVIEW_WIDTH = 140;
1010

11-
const illustrations: Illustration[] = Object.values(AxisIllustrations)
11+
const illustrations: Illustration[] = (
12+
Object.values(AxisIllustrations) as unknown[]
13+
)
1214
.filter(
1315
(value): value is Illustration =>
1416
typeof value === "function" &&

examples/src/storybook/components/advanced-data-grid.stories.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
AdvancedDataGridProps,
55
} from "@axiscommunications/fluent-advanced-data-grid";
66
import type { Meta, StoryObj } from "@storybook/react";
7+
import type { ReactElement } from "react";
78
import { AdvancedDataGridExample } from "../../stories/advanced-data-grid/examples/advanced-data-grid-example";
89
import { AdvancedDataGridMinimalExample } from "../../stories/advanced-data-grid/examples/advanced-data-grid-minimal-example";
910

@@ -45,7 +46,7 @@ const columns: AdvancedColumnDef<User>[] = [
4546
// can infer `args` and render the Controls / ArgTypes table.
4647
const AdvancedDataGridStory = AdvancedDataGrid as (
4748
props: AdvancedDataGridProps<User>
48-
) => JSX.Element;
49+
) => ReactElement;
4950

5051
/**
5152
* Advanced data grid

0 commit comments

Comments
 (0)