@kamrade/svelte-dynamic-button
Version:
A simple button template that supports a flexible set of themes, variants, sizes and shapes. You can find usage examples (MagicButton and SimpleButton components) in the repository.
36 lines (35 loc) • 1.32 kB
TypeScript
import { type IDButtonProps } from '../../kit/DynamicButton/DynamicButton.js';
export type ThemeType = 'primary' | 'secondary';
export type VariantType = 'contained' | 'outlined';
export type SizeType = 'sm' | 'lg' | 'xl';
export type ShapeType = 'straight' | 'rounded';
export declare const mainClassName = "SimpleButton";
export interface ISimpleButtonProps extends IDButtonProps {
className?: string;
theme?: ThemeType;
variant?: VariantType;
size?: SizeType;
shape?: ShapeType;
block?: boolean;
disabled?: boolean;
convex?: boolean;
loading?: boolean;
onClick?: (e: MouseEvent) => void;
iconButton?: boolean;
}
export declare const mergeProps: (defaultProps: ISimpleButtonProps, props: ISimpleButtonProps) => {
className?: string | undefined;
theme?: ThemeType | undefined;
variant?: VariantType | undefined;
size?: SizeType | undefined;
shape?: ShapeType | undefined;
block?: boolean | undefined;
disabled?: boolean | undefined;
convex?: boolean | undefined;
loading?: boolean | undefined;
onClick?: ((e: MouseEvent) => void) | undefined;
iconButton?: boolean | undefined;
type?: import("../../kit/DynamicButton/DynamicButton.js").ButtonType | undefined;
name?: string | undefined;
value?: string | undefined;
};