UNPKG

@yandex/ui

Version:

Yandex UI components

12 lines (11 loc) 678 B
import { __assign, __rest } from "tslib"; import React from 'react'; import { useComponentRegistry } from '@bem-react/di'; import { cnCheckbox } from '../Checkbox'; import './Checkbox-Tick.css'; export var CheckboxTick = function (_a) { var className = _a.className, view = _a.view, indeterminate = _a.indeterminate, props = __rest(_a, ["className", "view", "indeterminate"]); var Icon = useComponentRegistry(cnCheckbox()).Icon; var glyph = indeterminate ? 'type-indeterminate' : 'type-tick'; return (React.createElement("span", __assign({}, props, { className: cnCheckbox('Tick', null, [className]) }), view && React.createElement(Icon, { glyph: glyph }))); };