Files
cal.diy/packages/ui/components/icon/Icon.tsx
T
Keith Williams 78d06c6d01 refactor: Move classNames from @calcom/lib to @calcom/ui (#19674)
* refactor: Move classNames from @calcom/lib to @calcom/ui

* Import fix

* Removed extra import of classNames

* Removed tailwind-merge from @calcom/lib
2025-03-03 15:54:33 +00:00

30 lines
594 B
TypeScript

import { type SVGProps } from "react";
import cn from "@calcom/ui/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;