// AlignUI FileFormatIcon v0.0.0 import * as React from 'react'; import { tv, type VariantProps } from '@/utils/tv'; export const fileFormatIconVariants = tv({ slots: { root: 'relative shrink-0', formatBox: 'absolute bottom-1.5 left-0 flex h-4 items-center rounded px-[3px] py-0.5 text-[11px] font-semibold leading-none text-static-white', }, variants: { size: { medium: { root: 'size-10', }, small: { root: 'size-8', }, }, color: { red: { formatBox: 'bg-error-base', }, orange: { formatBox: 'bg-warning-base', }, yellow: { formatBox: 'bg-away-base', }, green: { formatBox: 'bg-success-base', }, sky: { formatBox: 'bg-verified-base', }, blue: { formatBox: 'bg-information-base', }, purple: { formatBox: 'bg-feature-base', }, pink: { formatBox: 'bg-highlighted-base', }, gray: { formatBox: 'bg-faded-base', }, }, }, defaultVariants: { color: 'gray', size: 'medium', }, }); function FileFormatIcon({ format, className, color, size, ...rest }: VariantProps & React.SVGProps) { const { root, formatBox } = fileFormatIconVariants({ color, size }); return ( {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */} {/* @ts-ignore */}
{format}
); } export { FileFormatIcon as Root };