@transferwise/components 0.0.0-experimental-3d4c2d5 → 0.0.0-experimental-c8fc1dc
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/build/index.esm.js +19 -11
- package/build/index.esm.js.map +1 -1
- package/build/index.js +19 -11
- package/build/index.js.map +1 -1
- package/build/types/instructionsList/InstructionsList.d.ts +4 -2
- package/build/types/instructionsList/InstructionsList.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/instructionsList/InstructionList.story.tsx +1 -0
- package/src/instructionsList/InstructionsList.tsx +41 -12
package/build/index.js
CHANGED
|
@@ -7602,34 +7602,42 @@ const InputWithDisplayFormat = props => /*#__PURE__*/jsxRuntime.jsx(WithDisplayF
|
|
|
7602
7602
|
|
|
7603
7603
|
const InstructionsList = ({
|
|
7604
7604
|
dos,
|
|
7605
|
-
donts
|
|
7605
|
+
donts,
|
|
7606
|
+
overrideCircleFillIcons = false
|
|
7606
7607
|
}) => {
|
|
7607
7608
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7608
7609
|
className: "tw-instructions",
|
|
7609
|
-
children: [dos && dos.map((doThis, index) =>
|
|
7610
|
-
/*#__PURE__*/
|
|
7610
|
+
children: [dos && dos.map((doThis, index) => /*#__PURE__*/jsxRuntime.jsx(Instruction
|
|
7611
7611
|
// eslint-disable-next-line react/no-array-index-key
|
|
7612
|
-
|
|
7612
|
+
, {
|
|
7613
7613
|
item: doThis,
|
|
7614
|
-
type: "do"
|
|
7615
|
-
|
|
7616
|
-
/*#__PURE__*/
|
|
7614
|
+
type: "do",
|
|
7615
|
+
overrideCircleFillIcons: overrideCircleFillIcons
|
|
7616
|
+
}, index)), donts && donts.map((dont, index) => /*#__PURE__*/jsxRuntime.jsx(Instruction
|
|
7617
7617
|
// eslint-disable-next-line react/no-array-index-key
|
|
7618
|
-
|
|
7618
|
+
, {
|
|
7619
7619
|
item: dont,
|
|
7620
|
-
type: "dont"
|
|
7620
|
+
type: "dont",
|
|
7621
|
+
overrideCircleFillIcons: overrideCircleFillIcons
|
|
7621
7622
|
}, index))]
|
|
7622
7623
|
});
|
|
7623
7624
|
};
|
|
7624
7625
|
function Instruction({
|
|
7625
7626
|
item,
|
|
7626
|
-
type
|
|
7627
|
+
type,
|
|
7628
|
+
overrideCircleFillIcons
|
|
7627
7629
|
}) {
|
|
7628
7630
|
const isInstructionNode = typeof item === 'object' && item !== null && 'content' in item && 'aria-label' in item;
|
|
7629
7631
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7630
7632
|
className: "instruction",
|
|
7631
7633
|
"aria-label": isInstructionNode ? item['aria-label'] : undefined,
|
|
7632
|
-
children: [type === 'do' ? /*#__PURE__*/jsxRuntime.jsx(icons.
|
|
7634
|
+
children: [overrideCircleFillIcons ? type === 'do' ? /*#__PURE__*/jsxRuntime.jsx(icons.Check, {
|
|
7635
|
+
size: 24,
|
|
7636
|
+
className: type
|
|
7637
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(icons.Cross, {
|
|
7638
|
+
size: 24,
|
|
7639
|
+
className: type
|
|
7640
|
+
}) : type === 'do' ? /*#__PURE__*/jsxRuntime.jsx(icons.CheckCircleFill, {
|
|
7633
7641
|
size: 24,
|
|
7634
7642
|
className: type
|
|
7635
7643
|
}) : /*#__PURE__*/jsxRuntime.jsx(icons.CrossCircleFill, {
|