Extracted icon from card component

This commit is contained in:
r-freeman 2023-02-13 20:05:01 +00:00
parent 64239feff0
commit aab890c44e
2 changed files with 16 additions and 15 deletions

View File

@ -1,8 +1,8 @@
import {ElementType, ReactNode} from 'react'
import Link from 'next/link' import Link from 'next/link'
import clsx from 'clsx' import clsx from 'clsx'
import {ElementType, ReactNode} from 'react'
import {twMerge} from 'tailwind-merge' import {twMerge} from 'tailwind-merge'
import {Props} from 'types' import {ChevronRightIcon} from '@/components/icons/ChevronRightIcon'
type Card = { type Card = {
as?: ElementType as?: ElementType
@ -39,19 +39,6 @@ type CardEyebrow = {
children: ReactNode children: ReactNode
} }
function ChevronRightIcon(props: Props) {
return (
<svg viewBox="0 0 16 16" fill="none" aria-hidden="true" {...props}>
<path
d="M6.75 5.75 9.25 8l-2.5 2.25"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
)
}
export function Card({ export function Card({
as: Component = 'div', as: Component = 'div',
variant = 'normal', variant = 'normal',

View File

@ -0,0 +1,14 @@
import {Props} from '@/types'
export function ChevronRightIcon(props: Props) {
return (
<svg viewBox="0 0 16 16" fill="none" aria-hidden="true" {...props}>
<path
d="M6.75 5.75 9.25 8l-2.5 2.25"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
)
}