@aristobyte-ui/dropdown
Version:
react dropdown component with trigger button, dropdownoptions, placement variants, fully typed typescript support, and composable integration with aristobyte ui button
36 lines (32 loc) • 1.28 kB
TypeScript
import * as React from 'react';
import { IButton } from '@aristobyte-ui/button';
interface IDropdownOption {
variant?: "default" | "primary" | "secondary" | "success" | "error" | "warning";
appearance?: "solid" | "outline" | "outline-dashed" | "no-outline" | "glowing";
children: string;
value: string;
onChange?: () => void;
selectedValues?: string[];
description?: string;
icon?: string;
disabled?: boolean;
choice?: "multiple" | "single";
style?: React.CSSProperties;
}
declare const DropdownOption: React.FC<IDropdownOption>;
interface IDropdown {
children: React.ReactElement<IDropdownOption> | React.ReactElement<IDropdownOption>[];
value: string;
button?: Omit<IButton, "children" | "dangerouslySetInnerHTML">;
variant?: "default" | "primary" | "secondary" | "success" | "error" | "warning";
appearance?: "solid" | "outline" | "outline-dashed" | "no-outline" | "glowing";
onChange?: (newValue: string) => void;
initiallyOpened?: boolean;
choice?: "multiple" | "single";
placeholder?: string;
disabled?: boolean;
className?: string;
style?: React.CSSProperties;
}
declare const Dropdown: React.FC<IDropdown>;
export { Dropdown, DropdownOption, type IDropdown, type IDropdownOption };