@sikka/hawa
Version:
Modern UI Kit made with Tailwind
71 lines (65 loc) • 2.25 kB
TypeScript
import * as React from 'react';
import { P as PositionType, R as RadioOptionType, D as DirectionType } from '../commonTypes-189mW5eB.js';
import * as class_variance_authority_types from 'class-variance-authority/types';
import { VariantProps } from 'class-variance-authority';
type LabelProps = {
hint?: React.ReactNode;
hintSide?: PositionType;
htmlFor?: string;
required?: boolean;
};
declare const buttonVariants: (props?: ({
variant?: "link" | "default" | "combobox" | "light" | "destructive" | "outline" | "secondary" | "ghost" | "neoBrutalism" | null | undefined;
size?: "default" | "icon" | "xs" | "sm" | "lg" | "xl" | "heightless" | "smallIcon" | null | undefined;
} & class_variance_authority_types.ClassProp) | undefined) => string;
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
asChild?: boolean;
centered?: boolean;
isLoading?: boolean;
label?: string;
labelProps?: LabelProps;
/** The small red text under the input field to show validation. */
helperText?: any;
showHelperText?: boolean;
/**
* If true, the button will include a label and helper text. This is useful for forms where the button is part of the form.
*/
asInput?: boolean;
}
type SubItem = {
label?: string;
value?: any;
icon?: any;
action?: () => void;
onMiddleClick?: (e: any) => void;
highlighted?: boolean;
disabled?: boolean;
slug?: string;
};
type MenuItemType = {
icon?: React.ReactNode;
label?: string;
shortcut?: React.ReactNode;
badged?: boolean;
value?: any;
content?: any;
slug?: string;
end?: any;
presist?: boolean;
itemType?: "separator" | "label" | "custom" | "radio";
action?: () => void;
highlighted?: boolean;
subitems?: SubItem[];
options?: RadioOptionType[];
currentOption?: string;
onOptionChange?: (value: string) => void;
disabled?: boolean;
onMiddleClick?: (e: any) => void;
onClick?: any;
};
interface SplitButtonProps extends ButtonProps {
direction?: DirectionType;
menuItems?: MenuItemType[];
}
declare const SplitButton: React.FC<SplitButtonProps>;
export { SplitButton };