UNPKG

@awsui/components-react

Version:

AWS UI is a collection of [React](https://reactjs.org/) components that help create intuitive, responsive, and accessible user experiences for web applications. It is developed by Amazon Web Services (AWS). This work is available under the terms of the [A

19 lines (18 loc) 1.26 kB
import { __assign, __rest } from "tslib"; import clsx from 'clsx'; import React from 'react'; import { getBaseProps } from '../../base-component'; import styles from './styles.css.js'; var CheckboxIcon = function (_a) { var _b, _c; var checked = _a.checked, indeterminate = _a.indeterminate, _d = _a.disabled, disabled = _d === void 0 ? false : _d, restProps = __rest(_a, ["checked", "indeterminate", "disabled"]); var baseProps = getBaseProps(restProps); return (React.createElement("svg", __assign({ className: styles.root, viewBox: "0 0 14 14", "aria-hidden": "true", focusable: "false" }, baseProps), React.createElement("rect", { className: clsx(styles['styled-box'], (_b = {}, _b[styles['styled-box-checked']] = checked, _b[styles['styled-box-indeterminate']] = indeterminate, _b[styles['styled-box-disabled']] = disabled, _b)), x: 0.5, y: 0.5, rx: 1.5, ry: 1.5, width: 13, height: 13 }), checked || indeterminate ? (React.createElement("polyline", { className: clsx(styles['styled-line'], (_c = {}, _c[styles['styled-line-disabled']] = disabled, _c)), points: indeterminate ? '2.5,7 11.5,7' : '2.5,7 6,10 11,3' })) : null)); }; export default CheckboxIcon;