1 | import { __assign, __rest } from "tslib";
|
2 | import * as React from 'react';
|
3 | function getSize(size) {
|
4 | if (size === 'sm') {
|
5 | return 16;
|
6 | }
|
7 | else if (size === 'md') {
|
8 | return 24;
|
9 | }
|
10 | else if (size === 'lg') {
|
11 | return 32;
|
12 | }
|
13 | else if (size === 'tool') {
|
14 | return 26;
|
15 | }
|
16 | return 24;
|
17 | }
|
18 | export function Icon(_a) {
|
19 | var children = _a.children, props = __rest(_a, ["children"]);
|
20 | return React.isValidElement(children)
|
21 | ? React.cloneElement(children, __assign(__assign({ 'aria-hidden': true, 'data-qa': "ci-" + props.name }, props), { width: getSize(props.size), height: getSize(props.size), focusable: false, style: __assign(__assign({}, props.style), { flex: '0 0 auto' }) }))
|
22 | : null;
|
23 | }
|
24 |
|
\ | No newline at end of file |