import classNames from "classnames" import type { PropsWithChildren } from "react" const icons = { 'feat': (classNames: string) => , 'warning': (classNames: string) => , } const defaultIcon = icons['warning'] export type InlineWarningProps = PropsWithChildren<{ size?: 'small' | 'normal' // normal is still small this is meant to be a small inline out-of-the-way warning label, icon?: keyof typeof icons }> export const InlineWarning = ({ size = 'normal', icon, children }: InlineWarningProps) => { return
{(icon ? (icons[icon] || defaultIcon) : defaultIcon)(classNames({ "min-w-4 max-w-4 min-h-4 max-h-4": size === 'normal', "min-w-3 max-w-3 min-h-3 max-h-3": size === 'small' }))} {children}
}