UNPKG

@telsystems/inputs

Version:
28 lines 1.53 kB
var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); import * as React from 'react'; import theme from '@telsystems/design/dist/themes/default/Dropdown.scss'; import { Checkbox } from '../Checkbox'; var BasicDropDownItem = (function (_super) { __extends(BasicDropDownItem, _super); function BasicDropDownItem() { return _super !== null && _super.apply(this, arguments) || this; } BasicDropDownItem.prototype.render = function () { var _a = this.props, title = _a.content.title, disabled = _a.disabled, selected = _a.selected, onClick = _a.onClick, useCheckbox = _a.useCheckbox; return (React.createElement("div", { className: theme['panel-item'], onClick: onClick }, useCheckbox ? React.createElement(Checkbox, { label: title, checked: selected }) : React.createElement("div", { className: "add-there-selected-class", dangerouslySetInnerHTML: { __html: title } }))); }; return BasicDropDownItem; }(React.Component)); export { BasicDropDownItem }; //# sourceMappingURL=BasicDropDownItem.js.map