Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[v17] Fix the icon story generation template #48659

Open
wants to merge 1 commit into
base: branch/v17
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading