@fchh/fcos-suite-ui
Version:
Reusable UI components based on React and TailwindCSS for the Fab City OS Suite (initially funded by the Interfacer EU project).
34 lines (33 loc) • 928 B
TypeScript
interface BaseProps {
type: "primary" | "secondary" | "tertiary";
size?: "xs" | "sm" | "md" | "lg" | "xl";
className?: string;
text?: string;
icon?: React.ReactNode;
iconRight?: boolean;
}
type ButtonOrLink = {
href?: never;
onClick?: () => void;
disabled?: boolean;
buttonType?: "button" | "submit" | "reset";
newTab?: never;
} | {
href: string;
onClick?: never;
disabled?: never;
buttonType?: never;
newTab?: boolean;
};
type CircularOrRounded = {
circular?: true;
rounded?: never;
text?: never;
} | {
circular?: never;
rounded?: true;
text?: string;
};
export type ButtonProps = BaseProps & ButtonOrLink & CircularOrRounded;
export declare function Button({ text, type, size, rounded, circular, disabled, icon, iconRight, onClick, href, buttonType, className, newTab, }: ButtonProps): import("react/jsx-runtime").JSX.Element;
export {};