diff --git a/.ladle/Icons.tsx b/.ladle/Icons.tsx new file mode 100644 index 0000000..af4943b --- /dev/null +++ b/.ladle/Icons.tsx @@ -0,0 +1,8 @@ +import React from 'react'; + +import { Icon, IconProps } from '../src/assets/Icons'; + +type Props = Omit; + +export const Minus = (props: Props) => ; +export const Plus = (props: Props) => ; diff --git a/src/Inputs/inputs-controlled.stories.tsx b/src/Inputs/inputs-controlled.stories.tsx index a757cd0..1a84662 100644 --- a/src/Inputs/inputs-controlled.stories.tsx +++ b/src/Inputs/inputs-controlled.stories.tsx @@ -1,7 +1,7 @@ import { useCallback, useState } from 'react'; -import { Minus, Plus } from 'react-feather'; import { Section } from 'utils'; +import { Minus, Plus } from '../../.ladle/Icons'; import { Button } from '../Button'; import { TextInput } from './TextInput'; diff --git a/src/Inputs/number-input-controlled.stories.tsx b/src/Inputs/number-input-controlled.stories.tsx index 54cc72c..e27d5a5 100644 --- a/src/Inputs/number-input-controlled.stories.tsx +++ b/src/Inputs/number-input-controlled.stories.tsx @@ -1,7 +1,7 @@ import { useCallback, useState } from 'react'; -import { Minus, Plus } from 'react-feather'; import { Section } from 'utils'; +import { Minus, Plus } from '../../.ladle/Icons'; import { Button } from '../Button'; import { NumberInput } from './NumberInput'; diff --git a/src/Modal/modal.stories.tsx b/src/Modal/modal.stories.tsx index fa19449..fd4c158 100644 --- a/src/Modal/modal.stories.tsx +++ b/src/Modal/modal.stories.tsx @@ -1,6 +1,6 @@ import { useRef, useState } from 'react'; -import { X } from 'react-feather'; +import { Icon } from '../assets/Icons'; import { Button } from '../Button'; import { Modal, type ModalRef } from './index'; @@ -41,7 +41,7 @@ export const ModalStory = () => {
  • Clicking outside of the modal,
  • - Clicking the Button at the top-right of the modal, + Clicking the Button at the top-right of the modal,
  • Clicking either button below.
  • diff --git a/src/assets/Icons.tsx b/src/assets/Icons.tsx index a589630..c4ecdae 100644 --- a/src/assets/Icons.tsx +++ b/src/assets/Icons.tsx @@ -2,7 +2,7 @@ import { type SVGProps } from 'react'; const icons = ['minus', 'plus', 'check', 'chevron-down', 'x'] as const; -interface IconProps extends SVGProps { +export interface IconProps extends SVGProps { id: (typeof icons)[number]; }