19 lines
440 B
TypeScript
19 lines
440 B
TypeScript
import { ComponentPropsWithRef, forwardRef, ReactNode } from "react";
|
|
|
|
export type ButtonState = {
|
|
loading?: boolean;
|
|
disabled?: boolean;
|
|
};
|
|
|
|
export type ButtonProps = {
|
|
size?: "xs" | "sm" | "md" | "lg";
|
|
shape?: "circle" | "rounded" | "square";
|
|
iconSvg?: ReactNode;
|
|
iconOnly?: boolean;
|
|
hideIcon?: boolean;
|
|
loadingIconSvg?: ReactNode;
|
|
} & ButtonState &
|
|
ComponentPropsWithRef<"button">;
|
|
|
|
export const Button = forwardRef();
|