@digigov/react-icons 1.0.0-rc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AccessibilityIcon/__snapshots__/index.test.tsx.snap +723 -0
- package/AccessibilityIcon/config.d.ts +8 -0
- package/AccessibilityIcon/config.js +31 -0
- package/AccessibilityIcon/index.d.ts +4 -0
- package/AccessibilityIcon/index.js +24 -0
- package/AccessibilityIcon/index.test.d.ts +1 -0
- package/AccessibilityIcon/index.test.js +137 -0
- package/ArrowIcon/__snapshots__/index.test.tsx.snap +148 -0
- package/ArrowIcon/config.d.ts +6 -0
- package/ArrowIcon/config.js +39 -0
- package/ArrowIcon/index.d.ts +4 -0
- package/ArrowIcon/index.js +24 -0
- package/ArrowIcon/index.test.d.ts +1 -0
- package/ArrowIcon/index.test.js +39 -0
- package/BurgerIcon/__snapshots__/index.test.tsx.snap +320 -0
- package/BurgerIcon/config.d.ts +6 -0
- package/BurgerIcon/config.js +45 -0
- package/BurgerIcon/index.d.ts +4 -0
- package/BurgerIcon/index.js +24 -0
- package/BurgerIcon/index.test.d.ts +1 -0
- package/BurgerIcon/index.test.js +56 -0
- package/CaretIcon/__snapshots__/index.test.tsx.snap +148 -0
- package/CaretIcon/config.d.ts +6 -0
- package/CaretIcon/config.js +39 -0
- package/CaretIcon/index.d.ts +4 -0
- package/CaretIcon/index.js +24 -0
- package/CaretIcon/index.test.d.ts +1 -0
- package/CaretIcon/index.test.js +39 -0
- package/CheckIcon/__snapshots__/index.test.tsx.snap +558 -0
- package/CheckIcon/config.d.ts +8 -0
- package/CheckIcon/config.js +23 -0
- package/CheckIcon/index.d.ts +4 -0
- package/CheckIcon/index.js +24 -0
- package/CheckIcon/index.test.d.ts +1 -0
- package/CheckIcon/index.test.js +129 -0
- package/CloseIcon/__snapshots__/index.test.tsx.snap +34 -0
- package/CloseIcon/config.d.ts +8 -0
- package/CloseIcon/config.js +23 -0
- package/CloseIcon/index.d.ts +4 -0
- package/CloseIcon/index.js +24 -0
- package/CloseIcon/index.test.d.ts +1 -0
- package/CloseIcon/index.test.js +15 -0
- package/GlobeIcon/__snapshots__/index.test.tsx.snap +149 -0
- package/GlobeIcon/config.d.ts +8 -0
- package/GlobeIcon/config.js +23 -0
- package/GlobeIcon/index.d.ts +4 -0
- package/GlobeIcon/index.js +24 -0
- package/GlobeIcon/index.test.d.ts +1 -0
- package/GlobeIcon/index.test.js +39 -0
- package/LICENSE +0 -0
- package/MoreVertIcon/__snapshots__/index.test.tsx.snap +738 -0
- package/MoreVertIcon/config.d.ts +8 -0
- package/MoreVertIcon/config.js +37 -0
- package/MoreVertIcon/index.d.ts +4 -0
- package/MoreVertIcon/index.js +24 -0
- package/MoreVertIcon/index.test.d.ts +1 -0
- package/MoreVertIcon/index.test.js +129 -0
- package/README.md +0 -0
- package/SearchIcon/__snapshots__/index.test.tsx.snap +34 -0
- package/SearchIcon/config.d.ts +8 -0
- package/SearchIcon/config.js +23 -0
- package/SearchIcon/index.d.ts +4 -0
- package/SearchIcon/index.js +24 -0
- package/SearchIcon/index.test.d.ts +1 -0
- package/SearchIcon/index.test.js +15 -0
- package/UncheckIcon/__snapshots__/index.test.tsx.snap +558 -0
- package/UncheckIcon/config.d.ts +8 -0
- package/UncheckIcon/config.js +23 -0
- package/UncheckIcon/index.d.ts +4 -0
- package/UncheckIcon/index.js +24 -0
- package/UncheckIcon/index.test.d.ts +1 -0
- package/UncheckIcon/index.test.js +129 -0
- package/es/AccessibilityIcon/__snapshots__/index.test.tsx.snap +723 -0
- package/es/AccessibilityIcon/config.js +19 -0
- package/es/AccessibilityIcon/index.js +9 -0
- package/es/AccessibilityIcon/index.test.js +131 -0
- package/es/ArrowIcon/__snapshots__/index.test.tsx.snap +148 -0
- package/es/ArrowIcon/config.js +27 -0
- package/es/ArrowIcon/index.js +9 -0
- package/es/ArrowIcon/index.test.js +33 -0
- package/es/BurgerIcon/__snapshots__/index.test.tsx.snap +320 -0
- package/es/BurgerIcon/config.js +32 -0
- package/es/BurgerIcon/index.js +9 -0
- package/es/BurgerIcon/index.test.js +50 -0
- package/es/CaretIcon/__snapshots__/index.test.tsx.snap +148 -0
- package/es/CaretIcon/config.js +27 -0
- package/es/CaretIcon/index.js +9 -0
- package/es/CaretIcon/index.test.js +33 -0
- package/es/CheckIcon/__snapshots__/index.test.tsx.snap +558 -0
- package/es/CheckIcon/config.js +11 -0
- package/es/CheckIcon/index.js +9 -0
- package/es/CheckIcon/index.test.js +123 -0
- package/es/CloseIcon/__snapshots__/index.test.tsx.snap +34 -0
- package/es/CloseIcon/config.js +11 -0
- package/es/CloseIcon/index.js +9 -0
- package/es/CloseIcon/index.test.js +9 -0
- package/es/GlobeIcon/__snapshots__/index.test.tsx.snap +149 -0
- package/es/GlobeIcon/config.js +11 -0
- package/es/GlobeIcon/index.js +9 -0
- package/es/GlobeIcon/index.test.js +33 -0
- package/es/MoreVertIcon/__snapshots__/index.test.tsx.snap +738 -0
- package/es/MoreVertIcon/config.js +25 -0
- package/es/MoreVertIcon/index.js +9 -0
- package/es/MoreVertIcon/index.test.js +123 -0
- package/es/SearchIcon/__snapshots__/index.test.tsx.snap +34 -0
- package/es/SearchIcon/config.js +11 -0
- package/es/SearchIcon/index.js +9 -0
- package/es/SearchIcon/index.test.js +9 -0
- package/es/UncheckIcon/__snapshots__/index.test.tsx.snap +558 -0
- package/es/UncheckIcon/config.js +11 -0
- package/es/UncheckIcon/index.js +9 -0
- package/es/UncheckIcon/index.test.js +123 -0
- package/es/icons.js +11 -0
- package/es/index.js +10 -0
- package/es/registry.js +42 -0
- package/esm/AccessibilityIcon/__snapshots__/index.test.tsx.snap +723 -0
- package/esm/AccessibilityIcon/config.js +19 -0
- package/esm/AccessibilityIcon/index.js +9 -0
- package/esm/AccessibilityIcon/index.test.js +131 -0
- package/esm/ArrowIcon/__snapshots__/index.test.tsx.snap +148 -0
- package/esm/ArrowIcon/config.js +27 -0
- package/esm/ArrowIcon/index.js +9 -0
- package/esm/ArrowIcon/index.test.js +33 -0
- package/esm/BurgerIcon/__snapshots__/index.test.tsx.snap +320 -0
- package/esm/BurgerIcon/config.js +32 -0
- package/esm/BurgerIcon/index.js +9 -0
- package/esm/BurgerIcon/index.test.js +50 -0
- package/esm/CaretIcon/__snapshots__/index.test.tsx.snap +148 -0
- package/esm/CaretIcon/config.js +27 -0
- package/esm/CaretIcon/index.js +9 -0
- package/esm/CaretIcon/index.test.js +33 -0
- package/esm/CheckIcon/__snapshots__/index.test.tsx.snap +558 -0
- package/esm/CheckIcon/config.js +11 -0
- package/esm/CheckIcon/index.js +9 -0
- package/esm/CheckIcon/index.test.js +123 -0
- package/esm/CloseIcon/__snapshots__/index.test.tsx.snap +34 -0
- package/esm/CloseIcon/config.js +11 -0
- package/esm/CloseIcon/index.js +9 -0
- package/esm/CloseIcon/index.test.js +9 -0
- package/esm/GlobeIcon/__snapshots__/index.test.tsx.snap +149 -0
- package/esm/GlobeIcon/config.js +11 -0
- package/esm/GlobeIcon/index.js +9 -0
- package/esm/GlobeIcon/index.test.js +33 -0
- package/esm/MoreVertIcon/__snapshots__/index.test.tsx.snap +738 -0
- package/esm/MoreVertIcon/config.js +25 -0
- package/esm/MoreVertIcon/index.js +9 -0
- package/esm/MoreVertIcon/index.test.js +123 -0
- package/esm/SearchIcon/__snapshots__/index.test.tsx.snap +34 -0
- package/esm/SearchIcon/config.js +11 -0
- package/esm/SearchIcon/index.js +9 -0
- package/esm/SearchIcon/index.test.js +9 -0
- package/esm/UncheckIcon/__snapshots__/index.test.tsx.snap +558 -0
- package/esm/UncheckIcon/config.js +11 -0
- package/esm/UncheckIcon/index.js +9 -0
- package/esm/UncheckIcon/index.test.js +123 -0
- package/esm/icons.js +11 -0
- package/esm/index.js +10 -0
- package/esm/registry.js +42 -0
- package/icons.d.ts +32 -0
- package/icons.js +135 -0
- package/index.d.ts +10 -0
- package/index.js +135 -0
- package/package.json +25 -0
- package/registry.d.ts +15 -0
- package/registry.js +67 -0
- package/src/AccessibilityIcon/__snapshots__/index.test.tsx.snap +723 -0
- package/src/AccessibilityIcon/config.tsx +22 -0
- package/src/AccessibilityIcon/index.test.tsx +57 -0
- package/src/AccessibilityIcon/index.tsx +10 -0
- package/src/ArrowIcon/__snapshots__/index.test.tsx.snap +148 -0
- package/src/ArrowIcon/config.tsx +29 -0
- package/src/ArrowIcon/index.test.tsx +20 -0
- package/src/ArrowIcon/index.tsx +8 -0
- package/src/BurgerIcon/__snapshots__/index.test.tsx.snap +320 -0
- package/src/BurgerIcon/config.tsx +25 -0
- package/src/BurgerIcon/index.test.tsx +26 -0
- package/src/BurgerIcon/index.tsx +8 -0
- package/src/CaretIcon/__snapshots__/index.test.tsx.snap +148 -0
- package/src/CaretIcon/config.tsx +21 -0
- package/src/CaretIcon/index.test.tsx +20 -0
- package/src/CaretIcon/index.tsx +8 -0
- package/src/CheckIcon/__snapshots__/index.test.tsx.snap +558 -0
- package/src/CheckIcon/config.tsx +15 -0
- package/src/CheckIcon/index.test.tsx +50 -0
- package/src/CheckIcon/index.tsx +8 -0
- package/src/CloseIcon/__snapshots__/index.test.tsx.snap +34 -0
- package/src/CloseIcon/config.tsx +15 -0
- package/src/CloseIcon/index.test.tsx +8 -0
- package/src/CloseIcon/index.tsx +8 -0
- package/src/GlobeIcon/__snapshots__/index.test.tsx.snap +149 -0
- package/src/GlobeIcon/config.tsx +26 -0
- package/src/GlobeIcon/index.test.tsx +19 -0
- package/src/GlobeIcon/index.tsx +8 -0
- package/src/MoreVertIcon/__snapshots__/index.test.tsx.snap +738 -0
- package/src/MoreVertIcon/config.tsx +17 -0
- package/src/MoreVertIcon/index.test.tsx +50 -0
- package/src/MoreVertIcon/index.tsx +8 -0
- package/src/SearchIcon/__snapshots__/index.test.tsx.snap +34 -0
- package/src/SearchIcon/config.tsx +15 -0
- package/src/SearchIcon/index.test.tsx +8 -0
- package/src/SearchIcon/index.tsx +8 -0
- package/src/UncheckIcon/__snapshots__/index.test.tsx.snap +558 -0
- package/src/UncheckIcon/config.tsx +15 -0
- package/src/UncheckIcon/index.test.tsx +50 -0
- package/src/UncheckIcon/index.tsx +8 -0
- package/src/icons.ts +34 -0
- package/src/index.ts +10 -0
- package/src/registry.js +47 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
|
|
4
|
+
var _ref2 = /*#__PURE__*/React.createElement("rect", {
|
|
5
|
+
id: "govgr-svg-icon--burger__line-1",
|
|
6
|
+
width: "20",
|
|
7
|
+
height: "3.3"
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
var _ref3 = /*#__PURE__*/React.createElement("rect", {
|
|
11
|
+
id: "govgr-svg-icon--burger__line-2",
|
|
12
|
+
width: "20",
|
|
13
|
+
height: "3.3"
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
var _ref4 = /*#__PURE__*/React.createElement("rect", {
|
|
17
|
+
id: "govgr-svg-icon--burger__line-3",
|
|
18
|
+
width: "20",
|
|
19
|
+
height: "3.3"
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export var burger = function burger(_ref) {
|
|
23
|
+
var _ref$active = _ref.active,
|
|
24
|
+
active = _ref$active === void 0 ? false : _ref$active;
|
|
25
|
+
return /*#__PURE__*/React.createElement("g", {
|
|
26
|
+
className: clsx(active && "govgr-svg-icon--burger--active")
|
|
27
|
+
}, _ref2, _ref3, _ref4);
|
|
28
|
+
}; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
|
|
31
|
+
burger.props = ['active'];
|
|
32
|
+
export default burger;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Icon from '@digigov/react-core/Icon';
|
|
4
|
+
export var BurgerIcon = function BurgerIcon(props) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
|
|
6
|
+
icon: "burger"
|
|
7
|
+
}));
|
|
8
|
+
};
|
|
9
|
+
export default BurgerIcon;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
import BurgerIcon from '@digigov/react-icons/BurgerIcon';
|
|
4
|
+
|
|
5
|
+
var _ref = /*#__PURE__*/React.createElement(BurgerIcon, null);
|
|
6
|
+
|
|
7
|
+
it('renders the BurgerIcon with no props', function () {
|
|
8
|
+
expect(mount(_ref)).toMatchSnapshot();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
var _ref2 = /*#__PURE__*/React.createElement(BurgerIcon, {
|
|
12
|
+
active: true
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('renders the BurgerIcon with prop active=true', function () {
|
|
16
|
+
expect(mount(_ref2)).toMatchSnapshot();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
var _ref3 = /*#__PURE__*/React.createElement(BurgerIcon, {
|
|
20
|
+
variant: "dark"
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('renders the BurgerIcon with prop variant=dark', function () {
|
|
24
|
+
expect(mount(_ref3)).toMatchSnapshot();
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
var _ref4 = /*#__PURE__*/React.createElement(BurgerIcon, {
|
|
28
|
+
variant: "light"
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('renders the BurgerIcon prop variant= "light"', function () {
|
|
32
|
+
expect(mount(_ref4)).toMatchSnapshot();
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
var _ref5 = /*#__PURE__*/React.createElement(BurgerIcon, {
|
|
36
|
+
variant: "error"
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('renders the BurgerIcon prop variant= "error"', function () {
|
|
40
|
+
expect(mount(_ref5)).toMatchSnapshot();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
var _ref6 = /*#__PURE__*/React.createElement(BurgerIcon, {
|
|
44
|
+
active: true,
|
|
45
|
+
variant: "light"
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('renders the BurgerIcon props active variant= "light"', function () {
|
|
49
|
+
expect(mount(_ref6)).toMatchSnapshot();
|
|
50
|
+
});
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the CaretIcon with direction down prop 1`] = `
|
|
4
|
+
<CaretIcon
|
|
5
|
+
direction="down"
|
|
6
|
+
>
|
|
7
|
+
<ForwardRef(Icon)
|
|
8
|
+
direction="down"
|
|
9
|
+
icon="caret"
|
|
10
|
+
>
|
|
11
|
+
<ForwardRef(SvgIcon)
|
|
12
|
+
className="govgr-svg-icon--caret"
|
|
13
|
+
>
|
|
14
|
+
<ForwardRef(Base)
|
|
15
|
+
aria-hidden="true"
|
|
16
|
+
as="svg"
|
|
17
|
+
className="govgr-svg-icon--caret govgr-svg-icon"
|
|
18
|
+
focusable="false"
|
|
19
|
+
viewBox="0 0 24 24"
|
|
20
|
+
>
|
|
21
|
+
<svg
|
|
22
|
+
aria-hidden="true"
|
|
23
|
+
className="govgr-svg-icon--caret govgr-svg-icon"
|
|
24
|
+
focusable="false"
|
|
25
|
+
viewBox="0 0 24 24"
|
|
26
|
+
>
|
|
27
|
+
<caret
|
|
28
|
+
direction="down"
|
|
29
|
+
>
|
|
30
|
+
<path
|
|
31
|
+
d="M22,6H2l10,12L22,6z"
|
|
32
|
+
/>
|
|
33
|
+
</caret>
|
|
34
|
+
</svg>
|
|
35
|
+
</ForwardRef(Base)>
|
|
36
|
+
</ForwardRef(SvgIcon)>
|
|
37
|
+
</ForwardRef(Icon)>
|
|
38
|
+
</CaretIcon>
|
|
39
|
+
`;
|
|
40
|
+
|
|
41
|
+
exports[`renders the CaretIcon with direction right prop 1`] = `
|
|
42
|
+
<CaretIcon
|
|
43
|
+
direction="right"
|
|
44
|
+
>
|
|
45
|
+
<ForwardRef(Icon)
|
|
46
|
+
direction="right"
|
|
47
|
+
icon="caret"
|
|
48
|
+
>
|
|
49
|
+
<ForwardRef(SvgIcon)
|
|
50
|
+
className="govgr-svg-icon--caret"
|
|
51
|
+
>
|
|
52
|
+
<ForwardRef(Base)
|
|
53
|
+
aria-hidden="true"
|
|
54
|
+
as="svg"
|
|
55
|
+
className="govgr-svg-icon--caret govgr-svg-icon"
|
|
56
|
+
focusable="false"
|
|
57
|
+
viewBox="0 0 24 24"
|
|
58
|
+
>
|
|
59
|
+
<svg
|
|
60
|
+
aria-hidden="true"
|
|
61
|
+
className="govgr-svg-icon--caret govgr-svg-icon"
|
|
62
|
+
focusable="false"
|
|
63
|
+
viewBox="0 0 24 24"
|
|
64
|
+
>
|
|
65
|
+
<caret
|
|
66
|
+
direction="right"
|
|
67
|
+
>
|
|
68
|
+
<path
|
|
69
|
+
d="M6,2v20l12-10L6,2z"
|
|
70
|
+
/>
|
|
71
|
+
</caret>
|
|
72
|
+
</svg>
|
|
73
|
+
</ForwardRef(Base)>
|
|
74
|
+
</ForwardRef(SvgIcon)>
|
|
75
|
+
</ForwardRef(Icon)>
|
|
76
|
+
</CaretIcon>
|
|
77
|
+
`;
|
|
78
|
+
|
|
79
|
+
exports[`renders the CaretIcon with direction up prop 1`] = `
|
|
80
|
+
<CaretIcon
|
|
81
|
+
direction="up"
|
|
82
|
+
>
|
|
83
|
+
<ForwardRef(Icon)
|
|
84
|
+
direction="up"
|
|
85
|
+
icon="caret"
|
|
86
|
+
>
|
|
87
|
+
<ForwardRef(SvgIcon)
|
|
88
|
+
className="govgr-svg-icon--caret"
|
|
89
|
+
>
|
|
90
|
+
<ForwardRef(Base)
|
|
91
|
+
aria-hidden="true"
|
|
92
|
+
as="svg"
|
|
93
|
+
className="govgr-svg-icon--caret govgr-svg-icon"
|
|
94
|
+
focusable="false"
|
|
95
|
+
viewBox="0 0 24 24"
|
|
96
|
+
>
|
|
97
|
+
<svg
|
|
98
|
+
aria-hidden="true"
|
|
99
|
+
className="govgr-svg-icon--caret govgr-svg-icon"
|
|
100
|
+
focusable="false"
|
|
101
|
+
viewBox="0 0 24 24"
|
|
102
|
+
>
|
|
103
|
+
<caret
|
|
104
|
+
direction="up"
|
|
105
|
+
>
|
|
106
|
+
<path
|
|
107
|
+
d="M2,18h20L12,6L2,18z"
|
|
108
|
+
/>
|
|
109
|
+
</caret>
|
|
110
|
+
</svg>
|
|
111
|
+
</ForwardRef(Base)>
|
|
112
|
+
</ForwardRef(SvgIcon)>
|
|
113
|
+
</ForwardRef(Icon)>
|
|
114
|
+
</CaretIcon>
|
|
115
|
+
`;
|
|
116
|
+
|
|
117
|
+
exports[`renders the CaretIcon with no props, direction prop is left by default 1`] = `
|
|
118
|
+
<CaretIcon>
|
|
119
|
+
<ForwardRef(Icon)
|
|
120
|
+
icon="caret"
|
|
121
|
+
>
|
|
122
|
+
<ForwardRef(SvgIcon)
|
|
123
|
+
className="govgr-svg-icon--caret"
|
|
124
|
+
>
|
|
125
|
+
<ForwardRef(Base)
|
|
126
|
+
aria-hidden="true"
|
|
127
|
+
as="svg"
|
|
128
|
+
className="govgr-svg-icon--caret govgr-svg-icon"
|
|
129
|
+
focusable="false"
|
|
130
|
+
viewBox="0 0 24 24"
|
|
131
|
+
>
|
|
132
|
+
<svg
|
|
133
|
+
aria-hidden="true"
|
|
134
|
+
className="govgr-svg-icon--caret govgr-svg-icon"
|
|
135
|
+
focusable="false"
|
|
136
|
+
viewBox="0 0 24 24"
|
|
137
|
+
>
|
|
138
|
+
<caret>
|
|
139
|
+
<path
|
|
140
|
+
d="M18,22V2L6,12L18,22z"
|
|
141
|
+
/>
|
|
142
|
+
</caret>
|
|
143
|
+
</svg>
|
|
144
|
+
</ForwardRef(Base)>
|
|
145
|
+
</ForwardRef(SvgIcon)>
|
|
146
|
+
</ForwardRef(Icon)>
|
|
147
|
+
</CaretIcon>
|
|
148
|
+
`;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
var _ref2 = /*#__PURE__*/React.createElement("path", {
|
|
4
|
+
d: "M18,22V2L6,12L18,22z"
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _ref3 = /*#__PURE__*/React.createElement("path", {
|
|
8
|
+
d: "M6,2v20l12-10L6,2z"
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
var _ref4 = /*#__PURE__*/React.createElement("path", {
|
|
12
|
+
d: "M2,18h20L12,6L2,18z"
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
var _ref5 = /*#__PURE__*/React.createElement("path", {
|
|
16
|
+
d: "M22,6H2l10,12L22,6z"
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export var caret = function caret(_ref) {
|
|
20
|
+
var _ref$direction = _ref.direction,
|
|
21
|
+
direction = _ref$direction === void 0 ? 'left' : _ref$direction;
|
|
22
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, direction === 'left' && _ref2, direction === 'right' && _ref3, direction === 'up' && _ref4, direction === 'down' && _ref5);
|
|
23
|
+
}; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
|
|
26
|
+
caret.props = ['direction'];
|
|
27
|
+
export default caret;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Icon from '@digigov/react-core/Icon';
|
|
4
|
+
export var CaretIcon = function CaretIcon(props) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
|
|
6
|
+
icon: "caret"
|
|
7
|
+
}));
|
|
8
|
+
};
|
|
9
|
+
export default CaretIcon;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
import CaretIcon from '@digigov/react-icons/CaretIcon';
|
|
4
|
+
|
|
5
|
+
var _ref = /*#__PURE__*/React.createElement(CaretIcon, null);
|
|
6
|
+
|
|
7
|
+
it('renders the CaretIcon with no props, direction prop is left by default', function () {
|
|
8
|
+
expect(mount(_ref)).toMatchSnapshot();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
var _ref2 = /*#__PURE__*/React.createElement(CaretIcon, {
|
|
12
|
+
direction: "right"
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('renders the CaretIcon with direction right prop', function () {
|
|
16
|
+
expect(mount(_ref2)).toMatchSnapshot();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
var _ref3 = /*#__PURE__*/React.createElement(CaretIcon, {
|
|
20
|
+
direction: "up"
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('renders the CaretIcon with direction up prop', function () {
|
|
24
|
+
expect(mount(_ref3)).toMatchSnapshot();
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
var _ref4 = /*#__PURE__*/React.createElement(CaretIcon, {
|
|
28
|
+
direction: "down"
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('renders the CaretIcon with direction down prop', function () {
|
|
32
|
+
expect(mount(_ref4)).toMatchSnapshot();
|
|
33
|
+
});
|