22 lines
463 B
TypeScript
22 lines
463 B
TypeScript
import React from "react"
|
|
import { IconProps } from "@medusajs/icons/dist/types"
|
|
import clsx from "clsx"
|
|
|
|
type InlineIconProps = IconProps & {
|
|
Icon: React.ComponentType<IconProps>
|
|
alt?: string
|
|
}
|
|
|
|
export const InlineIcon = ({ Icon, alt, ...props }: InlineIconProps) => {
|
|
return (
|
|
<Icon
|
|
{...props}
|
|
className={clsx(
|
|
"text-medusa-fg-subtle inline-block align-middle",
|
|
props.className
|
|
)}
|
|
aria-label={alt}
|
|
/>
|
|
)
|
|
}
|