Files
calendar/packages/ui/components/icon/Icon.tsx
T
luzpazandGitHub 71598a4389 fix: typos in packages/ui (#19434)
Found via `codespell -q 3 -S "*.svg,./apps/web/public/static/locales,./packages/app-store/stripepayment/lib/currencyOptions.ts,./packages/lib/freeEmailDomainCheck/freeEmailDomains.ts" -L afterall,atleast,datea,fo,incase,ist,nam,notin,optionel,perview,reccuring`
2025-02-21 15:06:49 +00:00

30 lines
595 B
TypeScript

import { type SVGProps } from "react";
import cn from "@calcom/lib/classNames";
import type { IconName } from "./icon-names";
function Icon({
name,
size = 16,
className,
...props
}: SVGProps<SVGSVGElement> & {
name: IconName;
size?: number | string;
}) {
return (
<svg
height={size}
width={size}
// Fill are inherited so we transparent by default. Can be overridden tailwind.
className={cn("fill-transparent", className)}
{...props}
aria-hidden>
<use href={`#${name}`} />
</svg>
);
}
export { IconName };
export default Icon;