@carrot-farm/mongsil-ui
Version:
react ui library
21 lines (20 loc) • 774 B
TypeScript
import * as React from 'react';
import { DropdownViewProps } from './DropdownView';
import DropdownItem from './DropdownItemView';
export interface DropdownProps<T> {
position?: DropdownViewProps['position'];
/** `false` 일 경우 스타일 비활성화 */
styled?: boolean;
data: T[];
rowKey?: ((item: T) => React.Key) | string;
/** 토글 버튼 */
button?: DropdownViewProps['button'];
renderItem: (item: T, index: number) => React.ReactNode;
onClick?: (item: T, index: number) => void;
}
declare function Dropdown<T>({ styled, data, rowKey, button, renderItem, onClick, ...args }: DropdownProps<T>): JSX.Element;
declare namespace Dropdown {
var displayName: string;
var Item: typeof DropdownItem;
}
export default Dropdown;