@transferwise/components 0.0.0-experimental-c099750 → 0.0.0-experimental-68c810c
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 +31 -30
- package/build/index.esm.js.map +1 -1
- package/build/index.js +31 -30
- package/build/index.js.map +1 -1
- package/build/main.css +1 -1
- package/build/styles/instructionsList/InstructionsList.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts +3 -4
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/instructionsList/InstructionsList.d.ts +10 -3
- package/build/types/instructionsList/InstructionsList.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +3 -0
- package/src/inputs/SelectInput.tsx +3 -3
- package/src/instructionsList/InstructionList.story.tsx +39 -0
- package/src/instructionsList/InstructionsList.css +1 -1
- package/src/instructionsList/InstructionsList.less +3 -15
- package/src/instructionsList/InstructionsList.spec.tsx +35 -0
- package/src/instructionsList/InstructionsList.tsx +40 -25
- package/src/main.css +1 -1
- package/src/instructionsList/InstructionList.story.js +0 -27
- package/src/instructionsList/InstructionsList.spec.js +0 -29
package/build/index.esm.js
CHANGED
|
@@ -7455,47 +7455,48 @@ InputWithDisplayFormat.propTypes = {
|
|
|
7455
7455
|
};
|
|
7456
7456
|
var InputWithDisplayFormat$1 = InputWithDisplayFormat;
|
|
7457
7457
|
|
|
7458
|
-
const InstructionsList =
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
const {
|
|
7463
|
-
dos,
|
|
7464
|
-
donts
|
|
7465
|
-
} = props;
|
|
7466
|
-
const DontIcon = isModern ? CrossCircleFill : CrossCircle;
|
|
7467
|
-
const DoIcon = isModern ? CheckCircleFill : CheckCircle;
|
|
7458
|
+
const InstructionsList = ({
|
|
7459
|
+
dos,
|
|
7460
|
+
donts
|
|
7461
|
+
}) => {
|
|
7468
7462
|
return /*#__PURE__*/jsxs("div", {
|
|
7469
7463
|
className: "tw-instructions",
|
|
7470
7464
|
children: [dos && dos.map((doThis, index) =>
|
|
7471
7465
|
/*#__PURE__*/
|
|
7472
7466
|
// eslint-disable-next-line react/no-array-index-key
|
|
7473
|
-
|
|
7474
|
-
|
|
7475
|
-
|
|
7476
|
-
size: 24,
|
|
7477
|
-
className: "do"
|
|
7478
|
-
}), /*#__PURE__*/jsx(Body, {
|
|
7479
|
-
className: "text-primary",
|
|
7480
|
-
type: Typography.BODY_LARGE,
|
|
7481
|
-
children: doThis
|
|
7482
|
-
})]
|
|
7467
|
+
jsx(Instruction, {
|
|
7468
|
+
item: doThis,
|
|
7469
|
+
type: "do"
|
|
7483
7470
|
}, index)), donts && donts.map((dont, index) =>
|
|
7484
7471
|
/*#__PURE__*/
|
|
7485
7472
|
// eslint-disable-next-line react/no-array-index-key
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
size: 24,
|
|
7490
|
-
className: "dont"
|
|
7491
|
-
}), /*#__PURE__*/jsx(Body, {
|
|
7492
|
-
className: "text-primary",
|
|
7493
|
-
type: Typography.BODY_LARGE,
|
|
7494
|
-
children: dont
|
|
7495
|
-
})]
|
|
7473
|
+
jsx(Instruction, {
|
|
7474
|
+
item: dont,
|
|
7475
|
+
type: "dont"
|
|
7496
7476
|
}, index))]
|
|
7497
7477
|
});
|
|
7498
7478
|
};
|
|
7479
|
+
function Instruction({
|
|
7480
|
+
item,
|
|
7481
|
+
type
|
|
7482
|
+
}) {
|
|
7483
|
+
const isInstructionNode = typeof item === 'object' && item !== null && 'content' in item && 'aria-label' in item;
|
|
7484
|
+
return /*#__PURE__*/jsxs("div", {
|
|
7485
|
+
className: "instruction",
|
|
7486
|
+
"aria-label": isInstructionNode ? item['aria-label'] : undefined,
|
|
7487
|
+
children: [type === 'do' ? /*#__PURE__*/jsx(CheckCircleFill, {
|
|
7488
|
+
size: 24,
|
|
7489
|
+
className: type
|
|
7490
|
+
}) : /*#__PURE__*/jsx(CrossCircleFill, {
|
|
7491
|
+
size: 24,
|
|
7492
|
+
className: type
|
|
7493
|
+
}), /*#__PURE__*/jsx(Body, {
|
|
7494
|
+
className: "text-primary",
|
|
7495
|
+
type: Typography.BODY_LARGE,
|
|
7496
|
+
children: isInstructionNode ? item.content : item
|
|
7497
|
+
})]
|
|
7498
|
+
});
|
|
7499
|
+
}
|
|
7499
7500
|
var InstructionsList$1 = InstructionsList;
|
|
7500
7501
|
|
|
7501
7502
|
const Loader = ({
|