Files
calendar/packages/ui/components/icon/Icon.tsx
T
Alex van AndelandGitHub be404436d7 fix: Do not self import @calcom/ui (#20050)
* fix: Do not self import @calcom/ui

* Make translations optional

* Fix mocking implementation of Button (never worked)

* Ensure other libraries can resolve AppListCard
2025-03-13 18:17:42 +00:00

30 lines
600 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, Icon };
export default Icon;