@n3/react-button-with-dropdown
v0.2.0
Published
Button with dropdown component for react applications based on @n3/kit
Downloads
10
Maintainers
Keywords
Readme
@n3/react-button-with-dropdown
Кнопка с выпадающим списком для приложений на базе @n3/kit
.
import ButtonWithDropdown from '@n3/react-button-with-dropdown';
Props
| Название | Обязательность | Тип | Значение по умолчанию | Описание |
|----------|----------------|-----|-----------------------|----------|
| size | | ButtonSize | | Размер кнопки |
| component | | ButtonComponent | undefined
| Компонент корневого элемента кнопки
Компонент кнопки |
| componentProps | | { [key: string]: any; } | undefined
| Дополнительный props компонента кнопки при использовании кастомного component
Дополнительные props кнопки |
| loading | | boolean | false
| Состояние загрузки
Находится ли кнопка в состоянии загрузки |
| disabled | | boolean | false
| Кнопка выключена
Выключены ли кнопка и дропдаун |
| pressed | | boolean | | Кнопка зажата |
| flatLeft | | boolean | | Не отображать закругления слева |
| flatRight | | boolean | | Не отображать закругления справа |
| onlyIcon | | boolean | | Кнопка состоит только из иконки |
| className | | string | | Дополнительный класс корневого компонента кнопки |
| onClick | | Function | Function.prototype
| Обработчик нажатия на кнопку
Обработчик нажатия на кнопку |
| children | | ReactNode | null
| Текст кнопки |
| dropdown | + | DropdownBase | | props компонента Dropdown |
| buttonDisabled | | boolean | false
| Выключена ли кнопка |
| color | | ButtonColor | buttonColors.DEFAULT
| Цвет |
| dropdownDisabled | | boolean | false
| Выключена ли кнопка открытия выпадающего списка |