From 6ce98e26c7e793780f7d6ea0a22a5d980f7ac114 Mon Sep 17 00:00:00 2001 From: Ryan Clark Date: Fri, 8 Nov 2024 08:34:44 +0100 Subject: [PATCH] Fix the icon story generation template (#48573) --- .../design/src/Icon/script/StoryTemplate.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/web/packages/design/src/Icon/script/StoryTemplate.txt b/web/packages/design/src/Icon/script/StoryTemplate.txt index 1566b54266c9d..895fc4dab3d6e 100644 --- a/web/packages/design/src/Icon/script/StoryTemplate.txt +++ b/web/packages/design/src/Icon/script/StoryTemplate.txt @@ -16,12 +16,14 @@ * along with this program. If not, see . */ -import React from 'react'; +import { ComponentType } from 'react'; import { Text } from '..'; import Flex from './../Flex'; +import { IconProps } from './Icon'; + import * as Icon from '.'; export default { @@ -40,7 +42,13 @@ export const Icons = () => ( ); -const IconBox = ({ IconCmpt, text }) => ( +const IconBox = ({ + IconCmpt, + text, +}: { + IconCmpt: ComponentType; + text: string; +}) => ( {text}