diff --git a/components/ui/Button.tsx b/components/ui/Button.tsx index 73ff565d53..9c05316e7d 100644 --- a/components/ui/Button.tsx +++ b/components/ui/Button.tsx @@ -2,14 +2,16 @@ import classNames from "@lib/classNames"; import Link, { LinkProps } from "next/link"; import React from "react"; +type SVGComponent = React.FunctionComponent>; + export type ButtonProps = { color?: "primary" | "secondary" | "minimal"; size?: "base" | "sm" | "lg" | "fab"; loading?: boolean; disabled?: boolean; onClick?: (event: React.MouseEvent) => void; - StartIcon?: JSX.IntrinsicElements["svg"]; - EndIcon?: JSX.IntrinsicElements["svg"]; + StartIcon?: SVGComponent; + EndIcon?: SVGComponent; } & ( | (Omit & { href: LinkProps["href"] }) | (JSX.IntrinsicElements["button"] & { href?: never })