@transferwise/components 46.126.0 → 46.127.1

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.
Files changed (64) hide show
  1. package/build/listItem/Prompt/ListItemPrompt.js +5 -4
  2. package/build/listItem/Prompt/ListItemPrompt.js.map +1 -1
  3. package/build/listItem/Prompt/ListItemPrompt.mjs +6 -2
  4. package/build/listItem/Prompt/ListItemPrompt.mjs.map +1 -1
  5. package/build/main.css +21 -21
  6. package/build/styles/main.css +21 -21
  7. package/build/styles/sentimentSurface/SentimentSurface.css +21 -21
  8. package/build/types/listItem/ListItem.d.ts +1 -1
  9. package/build/types/listItem/Prompt/ListItemPrompt.d.ts +2 -3
  10. package/build/types/listItem/Prompt/ListItemPrompt.d.ts.map +1 -1
  11. package/package.json +4 -4
  12. package/src/accordion/Accordion.test.js +0 -6
  13. package/src/accordion/AccordionItem/AccordionItem.test.js +0 -10
  14. package/src/actionButton/ActionButton.test.tsx +0 -4
  15. package/src/avatarWrapper/AvatarWrapper.test.tsx +0 -53
  16. package/src/checkbox/Checkbox.test.tsx +0 -5
  17. package/src/chevron/Chevron.test.tsx +0 -7
  18. package/src/chips/Chips.test.tsx +0 -8
  19. package/src/common/RadioButton/RadioButton.test.tsx +0 -18
  20. package/src/common/bottomSheet/BottomSheet.test.tsx +0 -9
  21. package/src/common/card/Card.test.tsx +0 -6
  22. package/src/common/closeButton/CloseButton.test.tsx +0 -4
  23. package/src/common/panel/Panel.test.tsx +0 -6
  24. package/src/flowNavigation/FlowNavigation.test.js +0 -10
  25. package/src/listItem/Prompt/ListItemPrompt.story.tsx +71 -9
  26. package/src/listItem/Prompt/ListItemPrompt.test.tsx +31 -0
  27. package/src/listItem/Prompt/ListItemPrompt.tsx +8 -2
  28. package/src/logo/Logo.story.tsx +24 -5
  29. package/src/main.css +21 -21
  30. package/src/overlayHeader/OverlayHeader.test.tsx +0 -3
  31. package/src/popover/Popover.test.tsx +0 -25
  32. package/src/promoCard/PromoCard.test.tsx +0 -6
  33. package/src/promoCard/PromoCardGroup.test.tsx +0 -5
  34. package/src/prompt/InlinePrompt/InlinePrompt.story.tsx +13 -10
  35. package/src/prompt/InlinePrompt/InlinePrompt.test.tsx +13 -1
  36. package/src/sentimentSurface/SentimentSurface.css +21 -21
  37. package/src/sentimentSurface/SentimentSurface.less +13 -13
  38. package/src/sentimentSurface/SentimentSurface.story.tsx +1 -1
  39. package/src/sentimentSurface/SentimentSurface.test.story.tsx +48 -1
  40. package/src/tile/Tile.test.tsx +0 -10
  41. package/src/tooltip/Tooltip.test.tsx +0 -10
  42. package/src/accordion/AccordionItem/__snapshots__/AccordionItem.test.js.snap +0 -124
  43. package/src/accordion/__snapshots__/Accordion.test.js.snap +0 -3
  44. package/src/actionButton/__snapshots__/ActionButton.test.tsx.snap +0 -12
  45. package/src/avatarWrapper/__snapshots__/AvatarWrapper.test.tsx.snap +0 -156
  46. package/src/checkbox/__snapshots__/Checkbox.test.tsx.snap +0 -40
  47. package/src/chevron/__snapshots__/Chevron.test.tsx.snap +0 -24
  48. package/src/chips/__snapshots__/Chips.test.tsx.snap +0 -153
  49. package/src/common/RadioButton/__snapshots__/RadioButton.test.tsx.snap +0 -58
  50. package/src/common/bottomSheet/__snapshots__/BottomSheet.test.tsx.snap +0 -80
  51. package/src/common/card/__snapshots__/Card.test.tsx.snap +0 -10
  52. package/src/common/closeButton/__snapshots__/CloseButton.test.tsx.snap +0 -30
  53. package/src/common/flowHeader/FlowHeader.test.tsx +0 -22
  54. package/src/common/flowHeader/__snapshots__/FlowHeader.test.tsx.snap +0 -33
  55. package/src/common/panel/__snapshots__/Panel.test.tsx.snap +0 -3
  56. package/src/flowNavigation/__snapshots__/FlowNavigation.test.js.snap +0 -262
  57. package/src/logo/Logo.test.tsx +0 -55
  58. package/src/logo/__snapshots__/Logo.test.tsx.snap +0 -281
  59. package/src/overlayHeader/__snapshots__/OverlayHeader.test.tsx.snap +0 -65
  60. package/src/popover/__snapshots__/Popover.test.tsx.snap +0 -51
  61. package/src/promoCard/__snapshots__/PromoCard.test.tsx.snap +0 -40
  62. package/src/promoCard/__snapshots__/PromoCardGroup.test.tsx.snap +0 -80
  63. package/src/tile/__snapshots__/Tile.test.tsx.snap +0 -55
  64. package/src/tooltip/__snapshots__/Tooltip.test.tsx.snap +0 -32
@@ -21,7 +21,7 @@ const screenModes: Theming['screenMode'][] = ['light', 'dark'];
21
21
 
22
22
  export default {
23
23
  component: SentimentSurface,
24
- title: 'Foundations/SentimentSurface/Tests',
24
+ title: 'Content/SentimentSurface/Tests',
25
25
  tags: ['!autodocs', '!manifest'],
26
26
  } satisfies Meta<typeof SentimentSurface>;
27
27
 
@@ -124,3 +124,50 @@ export const ButtonsAcrossThemes: Story = {
124
124
  </div>
125
125
  ),
126
126
  };
127
+
128
+ export const NeutralSentimentOnNeutralBackground: Story = {
129
+ render: () => (
130
+ <div
131
+ style={{
132
+ display: 'flex',
133
+ flexDirection: 'column',
134
+ }}
135
+ >
136
+ <SentimentSurface
137
+ sentiment="neutral"
138
+ style={{
139
+ padding: '16px',
140
+ }}
141
+ >
142
+ <Button v2>Primary</Button>
143
+ <Button v2 priority="secondary" style={{ marginLeft: '8px' }}>
144
+ Secondary
145
+ </Button>
146
+ <Button v2 priority="secondary-neutral" style={{ marginLeft: '8px' }}>
147
+ Secondary Neutral
148
+ </Button>
149
+ <Button v2 priority="tertiary" style={{ marginLeft: '8px' }}>
150
+ Tertiary
151
+ </Button>
152
+ </SentimentSurface>
153
+ <SentimentSurface
154
+ sentiment="neutral"
155
+ emphasis="elevated"
156
+ style={{
157
+ padding: '16px',
158
+ }}
159
+ >
160
+ <Button v2>Primary</Button>
161
+ <Button v2 priority="secondary" style={{ marginLeft: '8px' }}>
162
+ Secondary
163
+ </Button>
164
+ <Button v2 priority="secondary-neutral" style={{ marginLeft: '8px' }}>
165
+ Secondary Neutral
166
+ </Button>
167
+ <Button v2 priority="tertiary" style={{ marginLeft: '8px' }}>
168
+ Tertiary
169
+ </Button>
170
+ </SentimentSurface>
171
+ </div>
172
+ ),
173
+ };
@@ -17,16 +17,6 @@ describe(Tile, () => {
17
17
  jest.clearAllMocks();
18
18
  });
19
19
 
20
- it('matches snapshot when regular size', () => {
21
- const { asFragment } = render(<Tile {...defaultProps} />);
22
- expect(asFragment()).toMatchSnapshot();
23
- });
24
-
25
- it('matches snapshot when small size', () => {
26
- const { asFragment } = render(<Tile size={Size.SMALL} {...defaultProps} />);
27
- expect(asFragment()).toMatchSnapshot();
28
- });
29
-
30
20
  it('calls onClick when anchor is clicked', () => {
31
21
  render(<Tile {...defaultProps} />);
32
22
 
@@ -4,16 +4,6 @@ import { userEvent } from '@testing-library/user-event';
4
4
  import Tooltip from '.';
5
5
 
6
6
  describe('Tooltip Component', () => {
7
- it('renders an empty list when no items are passed', () => {
8
- expect(
9
- render(
10
- <Tooltip label="Test Tooltip">
11
- <span>Hover me</span>
12
- </Tooltip>,
13
- ).container,
14
- ).toMatchSnapshot();
15
- });
16
-
17
7
  it('initially is hidden (test with toBeInTheDocument)', () => {
18
8
  render(
19
9
  <Tooltip label="Test Tooltip">
@@ -1,124 +0,0 @@
1
- // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
-
3
- exports[`AccordionItem open / close renders an item closed 1`] = `
4
- <div>
5
- <div
6
- class="np-accordion-item"
7
- id="test-accordion"
8
- >
9
- <button
10
- aria-controls="test-accordion-section"
11
- aria-expanded="false"
12
- class="np-option decision"
13
- id="test-accordion-control"
14
- >
15
- <div
16
- class="media"
17
- >
18
- <div
19
- class="media-body"
20
- >
21
- <div
22
- aria-level="4"
23
- class="np-text-body-large-bold text-primary np-option__title"
24
- role="heading"
25
- >
26
- This is title number one
27
- </div>
28
- </div>
29
- <div
30
- class="media-right"
31
- >
32
- <span
33
- class="tw-icon tw-icon-chevron-up tw-chevron chevron-color bottom"
34
- data-testid="chevron-up-icon"
35
- >
36
- <svg
37
- aria-hidden="true"
38
- fill="currentColor"
39
- focusable="false"
40
- height="24"
41
- role="none"
42
- viewBox="0 0 24 24"
43
- width="24"
44
- >
45
- <path
46
- clip-rule="evenodd"
47
- d="m12 9.414 7.293 7.293 1.414-1.414L12.714 7.3a1.01 1.01 0 0 0-1.428 0l-7.993 7.993 1.414 1.414z"
48
- fill-rule="evenodd"
49
- />
50
- </svg>
51
- </span>
52
- </div>
53
- </div>
54
- </button>
55
- </div>
56
- </div>
57
- `;
58
-
59
- exports[`AccordionItem open / close renders an item open 1`] = `
60
- <div>
61
- <div
62
- class="np-accordion-item np-accordion-item--open"
63
- id="test-accordion"
64
- >
65
- <button
66
- aria-controls="test-accordion-section"
67
- aria-expanded="true"
68
- class="np-option decision"
69
- id="test-accordion-control"
70
- >
71
- <div
72
- class="media"
73
- >
74
- <div
75
- class="media-body"
76
- >
77
- <div
78
- aria-level="4"
79
- class="np-text-body-large-bold text-primary np-option__title"
80
- role="heading"
81
- >
82
- This is title number one
83
- </div>
84
- </div>
85
- <div
86
- class="media-right"
87
- >
88
- <span
89
- class="tw-icon tw-icon-chevron-up tw-chevron chevron-color top"
90
- data-testid="chevron-up-icon"
91
- >
92
- <svg
93
- aria-hidden="true"
94
- fill="currentColor"
95
- focusable="false"
96
- height="24"
97
- role="none"
98
- viewBox="0 0 24 24"
99
- width="24"
100
- >
101
- <path
102
- clip-rule="evenodd"
103
- d="m12 9.414 7.293 7.293 1.414-1.414L12.714 7.3a1.01 1.01 0 0 0-1.428 0l-7.993 7.993 1.414 1.414z"
104
- fill-rule="evenodd"
105
- />
106
- </svg>
107
- </span>
108
- </div>
109
- </div>
110
- </button>
111
- <div
112
- aria-labelledby="test-accordion-control"
113
- id="test-accordion-section"
114
- role="region"
115
- >
116
- <span
117
- class="np-text-body-large np-accordion-item__content d-block"
118
- >
119
- Lauri Ipsum has been the industry standard dummy text ever since the 1500s.
120
- </span>
121
- </div>
122
- </div>
123
- </div>
124
- `;
@@ -1,3 +0,0 @@
1
- // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
-
3
- exports[`Accordion defaults renders an empty list when no items are passed 1`] = `<div />`;
@@ -1,12 +0,0 @@
1
- // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
-
3
- exports[`ActionButton by default renders the button 1`] = `
4
- <div>
5
- <button
6
- class="np-action-btn np-text-body-default-bold btn-priority-1"
7
- type="button"
8
- >
9
- Personal profile
10
- </button>
11
- </div>
12
- `;
@@ -1,156 +0,0 @@
1
- // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
-
3
- exports[`FlowNavigationAvatar with a name AND profileType FlowNavigationAvatar with a name AND profileType AND avatar url renders the image 1`] = `
4
- <div
5
- class="tw-avatar tw-avatar--48 tw-avatar--thumbnail"
6
- >
7
- <div
8
- class="tw-avatar__content"
9
- >
10
- <img
11
- alt=""
12
- src="https://wise.com"
13
- />
14
- </div>
15
- </div>
16
- `;
17
-
18
- exports[`FlowNavigationAvatar with a name AND profileType FlowNavigationAvatar with a name AND profileType renders as BUSINESS profile type with an icon 1`] = `
19
- <div
20
- class="tw-avatar tw-avatar--48 tw-avatar--icon"
21
- >
22
- <div
23
- class="tw-avatar__content"
24
- >
25
- <span
26
- class="tw-icon tw-icon-briefcase "
27
- data-testid="briefcase-icon"
28
- >
29
- <svg
30
- aria-hidden="true"
31
- fill="currentColor"
32
- focusable="false"
33
- height="24"
34
- role="none"
35
- viewBox="0 0 24 24"
36
- width="24"
37
- >
38
- <path
39
- clip-rule="evenodd"
40
- d="M9.01 3A1.01 1.01 0 0 0 8 4.01V7H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3V4.01A1.01 1.01 0 0 0 14.99 3zM14 7V5h-4v2zm-4 2h4v9h-4zM8 9H5v9h3zm8 9V9h3v9z"
41
- fill-rule="evenodd"
42
- />
43
- </svg>
44
- </span>
45
- </div>
46
- </div>
47
- `;
48
-
49
- exports[`FlowNavigationAvatar with a name AND profileType FlowNavigationAvatar with a name AND profileType renders as PERSONAL profile type with an icon 1`] = `
50
- <div
51
- class="tw-avatar tw-avatar--48 tw-avatar--icon"
52
- >
53
- <div
54
- class="tw-avatar__content"
55
- >
56
- <span
57
- class="tw-icon tw-icon-person "
58
- data-testid="person-icon"
59
- >
60
- <svg
61
- aria-hidden="true"
62
- fill="currentColor"
63
- focusable="false"
64
- height="24"
65
- role="none"
66
- viewBox="0 0 24 24"
67
- width="24"
68
- >
69
- <path
70
- clip-rule="evenodd"
71
- d="M8 8a4 4 0 1 1 8 0 4 4 0 0 1-8 0m7.557 4.832a6 6 0 1 0-7.114 0A8 8 0 0 0 4 20v2h2v-2a6 6 0 0 1 12 0v2h2v-2a8 8 0 0 0-4.443-7.168"
72
- fill-rule="evenodd"
73
- />
74
- </svg>
75
- </span>
76
- </div>
77
- </div>
78
- `;
79
-
80
- exports[`FlowNavigationAvatar with a name AND profileType with a badge url passed renders the badge 1`] = `
81
- <div
82
- class="tw-badge tw-badge-border-light tw-badge-lg"
83
- >
84
- <div
85
- class="tw-badge__children"
86
- >
87
- <div
88
- class="tw-avatar tw-avatar--48 tw-avatar--icon"
89
- >
90
- <div
91
- class="tw-avatar__content"
92
- >
93
- <span
94
- class="tw-icon tw-icon-person "
95
- data-testid="person-icon"
96
- >
97
- <svg
98
- aria-hidden="true"
99
- fill="currentColor"
100
- focusable="false"
101
- height="24"
102
- role="none"
103
- viewBox="0 0 24 24"
104
- width="24"
105
- >
106
- <path
107
- clip-rule="evenodd"
108
- d="M8 8a4 4 0 1 1 8 0 4 4 0 0 1-8 0m7.557 4.832a6 6 0 1 0-7.114 0A8 8 0 0 0 4 20v2h2v-2a6 6 0 0 1 12 0v2h2v-2a8 8 0 0 0-4.443-7.168"
109
- fill-rule="evenodd"
110
- />
111
- </svg>
112
- </span>
113
- </div>
114
- </div>
115
- </div>
116
- <div
117
- class="tw-badge__content"
118
- >
119
- <img
120
- alt="badge alt text"
121
- src="https://badge.com"
122
- />
123
- </div>
124
- </div>
125
- `;
126
-
127
- exports[`FlowNavigationAvatar with a name AND profileType with nothing passed renders a personal icon 1`] = `
128
- <div
129
- class="tw-avatar tw-avatar--48 tw-avatar--icon"
130
- >
131
- <div
132
- class="tw-avatar__content"
133
- >
134
- <span
135
- class="tw-icon tw-icon-person "
136
- data-testid="person-icon"
137
- >
138
- <svg
139
- aria-hidden="true"
140
- fill="currentColor"
141
- focusable="false"
142
- height="24"
143
- role="none"
144
- viewBox="0 0 24 24"
145
- width="24"
146
- >
147
- <path
148
- clip-rule="evenodd"
149
- d="M8 8a4 4 0 1 1 8 0 4 4 0 0 1-8 0m7.557 4.832a6 6 0 1 0-7.114 0A8 8 0 0 0 4 20v2h2v-2a6 6 0 0 1 12 0v2h2v-2a8 8 0 0 0-4.443-7.168"
150
- fill-rule="evenodd"
151
- />
152
- </svg>
153
- </span>
154
- </div>
155
- </div>
156
- `;
@@ -1,40 +0,0 @@
1
- // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
-
3
- exports[`Checkbox renders the given label 1`] = `
4
- <div>
5
- <div
6
- class="np-checkbox checkbox"
7
- >
8
- <label
9
- class="np-checkbox-label"
10
- >
11
- <span
12
- class="np-checkbox-button p-r-2"
13
- >
14
- <input
15
- type="checkbox"
16
- />
17
- <span
18
- class="tw-checkbox-button"
19
- >
20
- <span
21
- class="tw-checkbox-check"
22
- />
23
- <span
24
- class="np-tw-checkbox-indeterminate"
25
- />
26
- </span>
27
- </span>
28
- <span
29
- class="np-text-body-large np-checkbox__text"
30
- >
31
- <span>
32
- <b>
33
- hello
34
- </b>
35
- </span>
36
- </span>
37
- </label>
38
- </div>
39
- </div>
40
- `;
@@ -1,24 +0,0 @@
1
- // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
-
3
- exports[`Chevron custom xs icon renders 1`] = `
4
- <div>
5
- <span
6
- aria-hidden="true"
7
- class="tw-icon tw-icon-chevron tw-chevron chevron-color bottom"
8
- role="presentation"
9
- >
10
- <svg
11
- fill="currentColor"
12
- focusable="false"
13
- height="10"
14
- viewBox="0 0 10 10"
15
- width="10"
16
- >
17
- <path
18
- d="M4.9995 2.0865L0.0635004 6.7645L1.2745 7.9125L4.9995 4.3835L8.7245 7.9135L9.9355 6.7645L4.9995 2.0865Z"
19
- fill-rule="evenodd"
20
- />
21
- </svg>
22
- </span>
23
- </div>
24
- `;
@@ -1,153 +0,0 @@
1
- // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
-
3
- exports[`Chips Choice Chips renders as expected 1`] = `
4
- <div>
5
- <div
6
- aria-label="Please select a category"
7
- class="np-chips d-flex"
8
- role="radiogroup"
9
- >
10
- <div
11
- aria-checked="false"
12
- class="np-chip d-flex align-items-center justify-content-between text-xs-nowrap"
13
- role="radio"
14
- tabindex="0"
15
- >
16
- <div
17
- aria-hidden="false"
18
- class="np-text-body-default-bold"
19
- >
20
- Accounting
21
- </div>
22
- </div>
23
- <div
24
- aria-checked="true"
25
- class="np-chip d-flex align-items-center justify-content-between text-xs-nowrap np-chip--selected"
26
- role="radio"
27
- tabindex="0"
28
- >
29
- <div
30
- aria-hidden="false"
31
- class="np-text-body-default-bold"
32
- >
33
- Payroll
34
- </div>
35
- </div>
36
- <div
37
- aria-checked="false"
38
- class="np-chip d-flex align-items-center justify-content-between text-xs-nowrap"
39
- role="radio"
40
- tabindex="0"
41
- >
42
- <div
43
- aria-hidden="false"
44
- class="np-text-body-default-bold"
45
- >
46
- Reporting
47
- </div>
48
- </div>
49
- <div
50
- aria-checked="false"
51
- class="np-chip d-flex align-items-center justify-content-between text-xs-nowrap"
52
- role="radio"
53
- tabindex="0"
54
- >
55
- <div
56
- aria-hidden="false"
57
- class="np-text-body-default-bold"
58
- >
59
- Payments
60
- </div>
61
- </div>
62
- </div>
63
- </div>
64
- `;
65
-
66
- exports[`Chips Filter Chips renders as expected 1`] = `
67
- <div>
68
- <div
69
- aria-label="Filter by categories"
70
- class="np-chips d-flex"
71
- role="group"
72
- >
73
- <div
74
- aria-checked="false"
75
- class="np-chip d-flex align-items-center justify-content-between text-xs-nowrap"
76
- role="checkbox"
77
- tabindex="0"
78
- >
79
- <div
80
- aria-hidden="false"
81
- class="np-text-body-default-bold"
82
- >
83
- Accounting
84
- </div>
85
- </div>
86
- <div
87
- aria-checked="false"
88
- class="np-chip d-flex align-items-center justify-content-between text-xs-nowrap"
89
- role="checkbox"
90
- tabindex="0"
91
- >
92
- <div
93
- aria-hidden="false"
94
- class="np-text-body-default-bold"
95
- >
96
- Payroll
97
- </div>
98
- </div>
99
- <div
100
- aria-checked="false"
101
- class="np-chip d-flex align-items-center justify-content-between text-xs-nowrap"
102
- role="checkbox"
103
- tabindex="0"
104
- >
105
- <div
106
- aria-hidden="false"
107
- class="np-text-body-default-bold"
108
- >
109
- Reporting
110
- </div>
111
- </div>
112
- <div
113
- aria-checked="true"
114
- class="np-chip d-flex align-items-center justify-content-between np-chip--removable text-xs-nowrap np-chip--selected p-r-1"
115
- role="checkbox"
116
- tabindex="-1"
117
- >
118
- <div
119
- aria-hidden="true"
120
- class="np-text-body-default-bold"
121
- >
122
- Payments
123
- </div>
124
- <button
125
- aria-label="Clear Payments"
126
- class="np-close-button close btn-link text-no-decoration btn-unstyled"
127
- type="button"
128
- >
129
- <span
130
- class="tw-icon tw-icon-cross-circle-fill "
131
- data-testid="cross-circle-fill-icon"
132
- >
133
- <svg
134
- aria-hidden="true"
135
- fill="currentColor"
136
- focusable="false"
137
- height="16"
138
- role="none"
139
- viewBox="0 0 24 24"
140
- width="16"
141
- >
142
- <path
143
- clip-rule="evenodd"
144
- d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10m-4.707-6.707L10.586 12 7.293 8.707l1.414-1.414L12 10.586l3.293-3.293 1.414 1.414L13.414 12l3.293 3.293-1.414 1.414L12 13.414l-3.293 3.293z"
145
- fill-rule="evenodd"
146
- />
147
- </svg>
148
- </span>
149
- </button>
150
- </div>
151
- </div>
152
- </div>
153
- `;
@@ -1,58 +0,0 @@
1
- // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
-
3
- exports[`Radio button renders checked state correctly 1`] = `
4
- <div>
5
- <input
6
- checked=""
7
- class="sr-only"
8
- name="radio-name"
9
- type="radio"
10
- value=""
11
- />
12
- <span
13
- class="tw-radio-button checked"
14
- >
15
- <span
16
- class="tw-radio-check"
17
- />
18
- </span>
19
- </div>
20
- `;
21
-
22
- exports[`Radio button renders correctly 1`] = `
23
- <div>
24
- <input
25
- class="sr-only"
26
- id="an-id"
27
- name="a-name"
28
- type="radio"
29
- value="a-value"
30
- />
31
- <span
32
- class="tw-radio-button"
33
- >
34
- <span
35
- class="tw-radio-check"
36
- />
37
- </span>
38
- </div>
39
- `;
40
-
41
- exports[`Radio button renders disabled state correctly 1`] = `
42
- <div>
43
- <input
44
- class="sr-only"
45
- disabled=""
46
- name="radio-name"
47
- type="radio"
48
- value=""
49
- />
50
- <span
51
- class="tw-radio-button disabled"
52
- >
53
- <span
54
- class="tw-radio-check"
55
- />
56
- </span>
57
- </div>
58
- `;