UNPKG

epn-ui

Version:

Дизайн система кабинета ВМ

14 lines (11 loc) 1.04 kB
import React from 'react'; import clsx from 'clsx'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faCheck } from '@fortawesome/pro-regular-svg-icons/faCheck'; import Button from '../Button/index.js'; var Chips = function (_a) { var id = _a.id, className = _a.className, style = _a.style, _b = _a.icon, icon = _b === void 0 ? React.createElement(FontAwesomeIcon, { icon: faCheck }) : _b, _c = _a.size, size = _c === void 0 ? 'middle' : _c, label = _a.label, _d = _a.checked, checked = _d === void 0 ? false : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, onChange = _a.onChange, iconPosition = _a.iconPosition; return (React.createElement(Button, { className: clsx('epn-toggle-button_chips', { 'epn-toggle-button_chips__active': checked }, className), style: style, id: id, disabled: disabled, icon: icon, size: size, onClick: function () { return onChange(!checked); }, iconPosition: iconPosition, type: "primary" }, label)); }; var Chips$1 = Chips; export { Chips$1 as default };