From aab890c44e758415d94d56aea80429d86e964384 Mon Sep 17 00:00:00 2001 From: r-freeman Date: Mon, 13 Feb 2023 20:05:01 +0000 Subject: [PATCH] Extracted icon from card component --- components/Card.tsx | 17 ++--------------- components/icons/ChevronRightIcon.tsx | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) create mode 100644 components/icons/ChevronRightIcon.tsx diff --git a/components/Card.tsx b/components/Card.tsx index e3517bc..56c89ca 100644 --- a/components/Card.tsx +++ b/components/Card.tsx @@ -1,8 +1,8 @@ +import {ElementType, ReactNode} from 'react' import Link from 'next/link' import clsx from 'clsx' -import {ElementType, ReactNode} from 'react' import {twMerge} from 'tailwind-merge' -import {Props} from 'types' +import {ChevronRightIcon} from '@/components/icons/ChevronRightIcon' type Card = { as?: ElementType @@ -39,19 +39,6 @@ type CardEyebrow = { children: ReactNode } -function ChevronRightIcon(props: Props) { - return ( - - ) -} - export function Card({ as: Component = 'div', variant = 'normal', diff --git a/components/icons/ChevronRightIcon.tsx b/components/icons/ChevronRightIcon.tsx new file mode 100644 index 0000000..114f9fc --- /dev/null +++ b/components/icons/ChevronRightIcon.tsx @@ -0,0 +1,14 @@ +import {Props} from '@/types' + +export function ChevronRightIcon(props: Props) { + return ( + + ) +} \ No newline at end of file