Skip to content

Commit

Permalink
Fix the icon story generation template (#48659)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanclark authored Nov 8, 2024
1 parent b739b18 commit eb6daa0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions web/packages/design/src/Icon/script/StoryTemplate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

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 {
Expand All @@ -40,7 +42,13 @@ export const Icons = () => (
</Flex>
);

const IconBox = ({ IconCmpt, text }) => (
const IconBox = ({
IconCmpt,
text,
}: {
IconCmpt: ComponentType<IconProps>;
text: string;
}) => (
<Flex m="10px" width="300px">
<IconCmpt />
<Text ml={2}>{text}</Text>
Expand Down

0 comments on commit eb6daa0

Please sign in to comment.