@transferwise/components 46.106.0 → 46.108.0
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/actionOption/ActionOption.js.map +1 -1
- package/build/actionOption/ActionOption.mjs.map +1 -1
- package/build/checkboxOption/CheckboxOption.js.map +1 -1
- package/build/checkboxOption/CheckboxOption.mjs.map +1 -1
- package/build/header/Header.js +1 -0
- package/build/header/Header.js.map +1 -1
- package/build/header/Header.mjs +1 -0
- package/build/header/Header.mjs.map +1 -1
- package/build/legacylistItem/LegacyListItem.js.map +1 -1
- package/build/legacylistItem/LegacyListItem.mjs.map +1 -1
- package/build/link/Link.js +6 -2
- package/build/link/Link.js.map +1 -1
- package/build/link/Link.mjs +6 -2
- package/build/link/Link.mjs.map +1 -1
- package/build/listItem/ListItem.js +28 -16
- package/build/listItem/ListItem.js.map +1 -1
- package/build/listItem/ListItem.mjs +28 -16
- package/build/listItem/ListItem.mjs.map +1 -1
- package/build/listItem/ListItemContext.js.map +1 -1
- package/build/listItem/ListItemContext.mjs.map +1 -1
- package/build/listItem/Navigation/ListItemNavigation.js +1 -3
- package/build/listItem/Navigation/ListItemNavigation.js.map +1 -1
- package/build/listItem/Navigation/ListItemNavigation.mjs +2 -4
- package/build/listItem/Navigation/ListItemNavigation.mjs.map +1 -1
- package/build/listItem/Prompt/InlinePrompt/InlinePrompt.js +74 -0
- package/build/listItem/Prompt/InlinePrompt/InlinePrompt.js.map +1 -0
- package/build/listItem/Prompt/InlinePrompt/InlinePrompt.mjs +72 -0
- package/build/listItem/Prompt/InlinePrompt/InlinePrompt.mjs.map +1 -0
- package/build/listItem/Prompt/ListItemPrompt.js +10 -15
- package/build/listItem/Prompt/ListItemPrompt.js.map +1 -1
- package/build/listItem/Prompt/ListItemPrompt.mjs +11 -16
- package/build/listItem/Prompt/ListItemPrompt.mjs.map +1 -1
- package/build/main.css +122 -81
- package/build/navigationOption/NavigationOption.js.map +1 -1
- package/build/navigationOption/NavigationOption.mjs.map +1 -1
- package/build/navigationOptionsList/NavigationOptionsList.js.map +1 -1
- package/build/navigationOptionsList/NavigationOptionsList.mjs.map +1 -1
- package/build/radioOption/RadioOption.js.map +1 -1
- package/build/radioOption/RadioOption.mjs.map +1 -1
- package/build/styles/link/Link.css +7 -0
- package/build/styles/listItem/ListItem.css +115 -81
- package/build/styles/listItem/ListItem.grid.css +11 -3
- package/build/styles/listItem/ListItem.vars.css +0 -0
- package/build/styles/listItem/Prompt/InlinePrompt/InlinePrompt.css +153 -0
- package/build/styles/listItem/Prompt/ListItemPrompt.css +72 -72
- package/build/styles/main.css +122 -81
- package/build/summary/Summary.js +8 -0
- package/build/summary/Summary.js.map +1 -1
- package/build/summary/Summary.mjs +8 -0
- package/build/summary/Summary.mjs.map +1 -1
- package/build/switchOption/SwitchOption.js +8 -0
- package/build/switchOption/SwitchOption.js.map +1 -1
- package/build/switchOption/SwitchOption.mjs +8 -0
- package/build/switchOption/SwitchOption.mjs.map +1 -1
- package/build/types/actionOption/ActionOption.d.ts +8 -0
- package/build/types/actionOption/ActionOption.d.ts.map +1 -1
- package/build/types/checkboxOption/CheckboxOption.d.ts +8 -0
- package/build/types/checkboxOption/CheckboxOption.d.ts.map +1 -1
- package/build/types/header/Header.d.ts +1 -0
- package/build/types/header/Header.d.ts.map +1 -1
- package/build/types/legacylistItem/LegacyListItem.d.ts +8 -0
- package/build/types/legacylistItem/LegacyListItem.d.ts.map +1 -1
- package/build/types/link/Link.d.ts +1 -1
- package/build/types/link/Link.d.ts.map +1 -1
- package/build/types/listItem/ListItem.d.ts +10 -1
- package/build/types/listItem/ListItem.d.ts.map +1 -1
- package/build/types/listItem/ListItemContext.d.ts +2 -1
- package/build/types/listItem/ListItemContext.d.ts.map +1 -1
- package/build/types/listItem/Navigation/ListItemNavigation.d.ts.map +1 -1
- package/build/types/listItem/Prompt/InlinePrompt/InlinePrompt.d.ts +15 -0
- package/build/types/listItem/Prompt/InlinePrompt/InlinePrompt.d.ts.map +1 -0
- package/build/types/listItem/Prompt/InlinePrompt/index.d.ts +3 -0
- package/build/types/listItem/Prompt/InlinePrompt/index.d.ts.map +1 -0
- package/build/types/listItem/Prompt/ListItemPrompt.d.ts +4 -6
- package/build/types/listItem/Prompt/ListItemPrompt.d.ts.map +1 -1
- package/build/types/listItem/_stories/helpers.d.ts +1 -1
- package/build/types/listItem/_stories/helpers.d.ts.map +1 -1
- package/build/types/listItem/_stories/subcomponents.d.ts +4 -0
- package/build/types/listItem/_stories/subcomponents.d.ts.map +1 -1
- package/build/types/listItem/_stories/variants/helpers.d.ts.map +1 -1
- package/build/types/listItem/constants.d.ts +16 -0
- package/build/types/listItem/constants.d.ts.map +1 -0
- package/build/types/listItem/useListItemControl.d.ts +1 -1
- package/build/types/navigationOption/NavigationOption.d.ts +8 -0
- package/build/types/navigationOption/NavigationOption.d.ts.map +1 -1
- package/build/types/navigationOptionsList/NavigationOptionsList.d.ts +9 -0
- package/build/types/navigationOptionsList/NavigationOptionsList.d.ts.map +1 -1
- package/build/types/radioOption/RadioOption.d.ts +8 -0
- package/build/types/radioOption/RadioOption.d.ts.map +1 -1
- package/build/types/summary/Summary.d.ts +8 -0
- package/build/types/summary/Summary.d.ts.map +1 -1
- package/build/types/switchOption/SwitchOption.d.ts +8 -0
- package/build/types/switchOption/SwitchOption.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/actionOption/ActionOption.story.tsx +4 -0
- package/src/actionOption/ActionOption.tsx +8 -0
- package/src/checkboxOption/CheckboxOption.story.tsx +4 -0
- package/src/checkboxOption/CheckboxOption.tsx +8 -0
- package/src/header/Header.story.tsx +14 -0
- package/src/header/Header.tsx +2 -0
- package/src/legacylistItem/LegacyListItem.story.tsx +4 -0
- package/src/legacylistItem/LegacyListItem.tsx +8 -0
- package/src/link/Link.css +7 -0
- package/src/link/Link.less +8 -0
- package/src/link/Link.spec.tsx +28 -0
- package/src/link/Link.story.tsx +72 -16
- package/src/link/Link.tsx +5 -1
- package/src/listItem/ListItem.css +115 -81
- package/src/listItem/ListItem.grid.css +11 -3
- package/src/listItem/ListItem.grid.less +14 -4
- package/src/listItem/ListItem.less +35 -8
- package/src/listItem/ListItem.spec.tsx +37 -1
- package/src/listItem/ListItem.tsx +47 -21
- package/src/listItem/ListItem.vars.css +0 -0
- package/src/listItem/ListItem.vars.less +11 -0
- package/src/listItem/ListItemContext.tsx +2 -1
- package/src/listItem/Navigation/ListItemNavigation.spec.tsx +1 -10
- package/src/listItem/Navigation/ListItemNavigation.story.tsx +0 -22
- package/src/listItem/Navigation/ListItemNavigation.tsx +2 -3
- package/src/listItem/Prompt/InlinePrompt/InlinePrompt.css +153 -0
- package/src/listItem/Prompt/InlinePrompt/InlinePrompt.less +162 -0
- package/src/listItem/Prompt/InlinePrompt/InlinePrompt.spec.tsx +66 -0
- package/src/listItem/Prompt/InlinePrompt/InlinePrompt.tsx +56 -0
- package/src/listItem/Prompt/InlinePrompt/index.ts +2 -0
- package/src/listItem/Prompt/ListItemPrompt.css +72 -72
- package/src/listItem/Prompt/ListItemPrompt.less +2 -130
- package/src/listItem/Prompt/ListItemPrompt.spec.tsx +36 -0
- package/src/listItem/Prompt/ListItemPrompt.story.tsx +4 -2
- package/src/listItem/Prompt/ListItemPrompt.tsx +14 -14
- package/src/listItem/_stories/ListItem.disabled.story.tsx +433 -0
- package/src/listItem/_stories/ListItem.layout.test.story.tsx +10 -155
- package/src/listItem/_stories/ListItem.scenarios.story.tsx +4 -25
- package/src/listItem/_stories/ListItem.story.tsx +17 -187
- package/src/listItem/_stories/helpers.tsx +23 -6
- package/src/listItem/_stories/subcomponents.tsx +19 -2
- package/src/listItem/_stories/variants/ListItem.medium.test.story.tsx +1 -1
- package/src/listItem/_stories/variants/ListItem.neutral.test.story.tsx +55 -0
- package/src/listItem/_stories/variants/ListItem.small.test.story.tsx +1 -1
- package/src/listItem/_stories/variants/helpers.tsx +28 -1
- package/src/listItem/constants.ts +15 -0
- package/src/main.css +122 -81
- package/src/navigationOption/NavigationOption.story.tsx +4 -1
- package/src/navigationOption/NavigationOption.tsx +8 -0
- package/src/navigationOptionsList/NavigationOptionsList.story.tsx +4 -0
- package/src/navigationOptionsList/NavigationOptionsList.tsx +9 -0
- package/src/radioOption/RadioOption.story.tsx +4 -0
- package/src/radioOption/RadioOption.tsx +8 -0
- package/src/summary/Summary.story.tsx +4 -0
- package/src/summary/Summary.tsx +8 -0
- package/src/switchOption/SwitchOption.story.tsx +4 -1
- package/src/switchOption/SwitchOption.tsx +8 -0
- package/src/table/Table.story.tsx +1 -1
|
@@ -5,6 +5,9 @@ import { FastFlag } from '@transferwise/icons';
|
|
|
5
5
|
import { Nudge, Title, Typography } from '..';
|
|
6
6
|
import CheckboxOption, { type CheckboxOptionProps } from './CheckboxOption';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* > ⚠️ This component is **deprecated** and superseded by the [new ListItem component](?path=/docs/content-listitem--docs) with the [ListItem.Checkbox control](?path=/docs/content-listitem-listitem-checkbox--docs).
|
|
10
|
+
*/
|
|
8
11
|
const meta: Meta<typeof CheckboxOption> = {
|
|
9
12
|
component: CheckboxOption,
|
|
10
13
|
title: 'Option/CheckboxOption',
|
|
@@ -13,6 +16,7 @@ const meta: Meta<typeof CheckboxOption> = {
|
|
|
13
16
|
source: { type: 'dynamic' },
|
|
14
17
|
},
|
|
15
18
|
},
|
|
19
|
+
tags: ['deprecated'],
|
|
16
20
|
};
|
|
17
21
|
|
|
18
22
|
export default meta;
|
|
@@ -15,6 +15,14 @@ export type CheckboxOptionProps = Omit<BaseOptionProps, 'onChange'> & {
|
|
|
15
15
|
onChange?: (value: boolean) => void;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Please use `<ListItem />` instead.
|
|
20
|
+
* @deprecatedSince 46.104.0
|
|
21
|
+
* @see [Source](../listItem/ListItem.tsx)
|
|
22
|
+
* @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)
|
|
23
|
+
* @see [Design docs](https://wise.design/components/list-item)
|
|
24
|
+
* @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)
|
|
25
|
+
*/
|
|
18
26
|
const CheckboxOption = forwardRef<ReferenceType, CheckboxOptionProps>(
|
|
19
27
|
({ checked, disabled, onChange, ...rest }, reference) => {
|
|
20
28
|
return (
|
|
@@ -98,6 +98,7 @@ export const Playground: Story = {
|
|
|
98
98
|
'aria-label': 'Action',
|
|
99
99
|
text: 'Click me',
|
|
100
100
|
onClick: () => alert('Action clicked!'),
|
|
101
|
+
disabled: false,
|
|
101
102
|
},
|
|
102
103
|
},
|
|
103
104
|
};
|
|
@@ -133,6 +134,19 @@ export const ActionAsLink: Story = {
|
|
|
133
134
|
argTypes: hideControls(['as', 'className', 'level', 'title', 'testId']),
|
|
134
135
|
};
|
|
135
136
|
|
|
137
|
+
export const DisabledAction: Story = {
|
|
138
|
+
args: {
|
|
139
|
+
title: 'Header with Disabled Action',
|
|
140
|
+
action: {
|
|
141
|
+
'aria-label': 'Disabled action',
|
|
142
|
+
text: 'Disabled Action',
|
|
143
|
+
onClick: () => alert('This should not fire!'),
|
|
144
|
+
disabled: true,
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
argTypes: hideControls(['as', 'className', 'level', 'title', 'testId']),
|
|
148
|
+
};
|
|
149
|
+
|
|
136
150
|
/**
|
|
137
151
|
* Demonstrates a `Header` rendered as a custom HTML element.
|
|
138
152
|
*/
|
package/src/header/Header.tsx
CHANGED
|
@@ -8,6 +8,7 @@ import React, { useEffect, useRef, FunctionComponent, ReactNode } from 'react';
|
|
|
8
8
|
type ActionProps = AriaLabelProperty & {
|
|
9
9
|
text: string;
|
|
10
10
|
onClick?: (event: React.MouseEvent) => void;
|
|
11
|
+
disabled?: boolean;
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
type ButtonActionProps = ActionProps;
|
|
@@ -58,6 +59,7 @@ const HeaderAction = React.forwardRef<
|
|
|
58
59
|
aria-label={action['aria-label']}
|
|
59
60
|
href={'href' in action ? action.href : undefined}
|
|
60
61
|
target={'target' in action ? action.target : undefined}
|
|
62
|
+
disabled={action.disabled}
|
|
61
63
|
onClick={action.onClick}
|
|
62
64
|
>
|
|
63
65
|
{action.text}
|
|
@@ -8,9 +8,13 @@ import Info from '../info';
|
|
|
8
8
|
import Title from '../title/Title';
|
|
9
9
|
import LegacyListItem from '.';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* > ⚠️ This component is **deprecated** and superseded by the [new ListItem component](?path=/docs/content-listitem--docs).
|
|
13
|
+
*/
|
|
11
14
|
export default {
|
|
12
15
|
component: LegacyListItem,
|
|
13
16
|
title: 'Content/LegacyListItem',
|
|
17
|
+
tags: ['deprecated'],
|
|
14
18
|
};
|
|
15
19
|
|
|
16
20
|
const Template = ({
|
|
@@ -13,6 +13,14 @@ export type LegacyListItemProps = {
|
|
|
13
13
|
as?: ElementType;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Please use `<ListItem />` instead.
|
|
18
|
+
* @deprecatedSince 46.104.0
|
|
19
|
+
* @see [Source](../listItem/ListItem.tsx)
|
|
20
|
+
* @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)
|
|
21
|
+
* @see [Design docs](https://wise.design/components/list-item)
|
|
22
|
+
* @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)
|
|
23
|
+
*/
|
|
16
24
|
const LegacyListItem: FC<LegacyListItemProps> = ({
|
|
17
25
|
media,
|
|
18
26
|
action,
|
package/src/link/Link.css
CHANGED
package/src/link/Link.less
CHANGED
package/src/link/Link.spec.tsx
CHANGED
|
@@ -74,4 +74,32 @@ describe('Link', () => {
|
|
|
74
74
|
|
|
75
75
|
expect(link).toHaveAttribute('aria-label', 'make me accessible');
|
|
76
76
|
});
|
|
77
|
+
|
|
78
|
+
it('renders disabled button with attribute and class', () => {
|
|
79
|
+
const onClick = jest.fn();
|
|
80
|
+
render(
|
|
81
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
82
|
+
<Link disabled onClick={onClick}>
|
|
83
|
+
button as link
|
|
84
|
+
</Link>,
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
const link = screen.getByText('button as link');
|
|
88
|
+
expect(link.tagName).toBe('BUTTON');
|
|
89
|
+
expect(link).toHaveClass('np-link--disabled');
|
|
90
|
+
expect(link).toBeDisabled();
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
it('passes disabled attribute to anchor element when rendered as link', () => {
|
|
94
|
+
render(
|
|
95
|
+
<Link {...props} disabled>
|
|
96
|
+
disabled link
|
|
97
|
+
</Link>,
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
const link = screen.getByText('disabled link');
|
|
101
|
+
|
|
102
|
+
expect(link).toHaveClass('np-link--disabled');
|
|
103
|
+
expect(link.tagName).toBe('A');
|
|
104
|
+
});
|
|
77
105
|
});
|
package/src/link/Link.story.tsx
CHANGED
|
@@ -36,68 +36,124 @@ export const Basic = () => {
|
|
|
36
36
|
>
|
|
37
37
|
button as Link
|
|
38
38
|
</Link>
|
|
39
|
+
|
|
40
|
+
<Title type={Typography.TITLE_SCREEN} className="m-t-3">
|
|
41
|
+
Disabled links
|
|
42
|
+
</Title>
|
|
43
|
+
<Link href="#" disabled className="m-t-3">
|
|
44
|
+
Disabled link
|
|
45
|
+
</Link>
|
|
46
|
+
<Link type={Typography.LINK_LARGE} href="#" disabled className="m-t-3">
|
|
47
|
+
Disabled large link
|
|
48
|
+
</Link>
|
|
49
|
+
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}
|
|
50
|
+
<Link className="m-t-3" disabled onClick={() => console.log('click disabled button')}>
|
|
51
|
+
Disabled button as Link
|
|
52
|
+
</Link>
|
|
53
|
+
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}
|
|
54
|
+
<Link
|
|
55
|
+
className="m-t-3"
|
|
56
|
+
type={Typography.LINK_LARGE}
|
|
57
|
+
disabled
|
|
58
|
+
onClick={() => console.log('click disabled button')}
|
|
59
|
+
>
|
|
60
|
+
Disabled button as Link (large)
|
|
61
|
+
</Link>
|
|
62
|
+
|
|
39
63
|
<Title type={Typography.TITLE_SCREEN} className="m-t-3">
|
|
40
64
|
Links via <code>{'<Link />'}</code> component in all types of body copy
|
|
41
65
|
</Title>
|
|
42
66
|
<Body type={Typography.BODY_LARGE_BOLD} className="m-t-3">
|
|
43
|
-
We
|
|
67
|
+
We're building the world's{' '}
|
|
44
68
|
<Link href="#" target="_blank">
|
|
45
69
|
most international account
|
|
46
70
|
</Link>
|
|
47
|
-
. We
|
|
71
|
+
. We're building the world's most international account
|
|
48
72
|
</Body>
|
|
49
73
|
<Body type={Typography.BODY_LARGE} className="m-t-3">
|
|
50
|
-
We
|
|
74
|
+
We're building the world's{' '}
|
|
51
75
|
<Link href="#" target="_blank">
|
|
52
76
|
most international account
|
|
53
77
|
</Link>
|
|
54
|
-
. We
|
|
78
|
+
. We're building the world's most international account
|
|
55
79
|
</Body>
|
|
56
80
|
<Body type={Typography.BODY_DEFAULT_BOLD} className="m-t-3">
|
|
57
|
-
We
|
|
81
|
+
We're building the world's{' '}
|
|
58
82
|
<Link href="#" target="_blank">
|
|
59
83
|
most international account
|
|
60
84
|
</Link>
|
|
61
|
-
. We
|
|
85
|
+
. We're building the world's most international account
|
|
62
86
|
</Body>
|
|
63
87
|
<Body type={Typography.BODY_DEFAULT} className="m-t-3">
|
|
64
|
-
We
|
|
88
|
+
We're building the world's{' '}
|
|
65
89
|
<Link href="#" target="_blank">
|
|
66
90
|
most international account
|
|
67
91
|
</Link>
|
|
68
|
-
. We
|
|
92
|
+
. We're building the world's most international account
|
|
93
|
+
</Body>
|
|
94
|
+
|
|
95
|
+
<Title type={Typography.TITLE_SCREEN} className="m-t-3">
|
|
96
|
+
Disabled links in body copy
|
|
97
|
+
</Title>
|
|
98
|
+
<Body type={Typography.BODY_LARGE_BOLD} className="m-t-3">
|
|
99
|
+
We're building the world's{' '}
|
|
100
|
+
<Link href="#" disabled>
|
|
101
|
+
most international account
|
|
102
|
+
</Link>
|
|
103
|
+
. We're building the world's most international account
|
|
104
|
+
</Body>
|
|
105
|
+
<Body type={Typography.BODY_LARGE} className="m-t-3">
|
|
106
|
+
We're building the world's{' '}
|
|
107
|
+
<Link href="#" disabled>
|
|
108
|
+
most international account
|
|
109
|
+
</Link>
|
|
110
|
+
. We're building the world's most international account
|
|
111
|
+
</Body>
|
|
112
|
+
<Body type={Typography.BODY_DEFAULT_BOLD} className="m-t-3">
|
|
113
|
+
We're building the world's{' '}
|
|
114
|
+
<Link href="#" disabled>
|
|
115
|
+
most international account
|
|
116
|
+
</Link>
|
|
117
|
+
. We're building the world's most international account
|
|
118
|
+
</Body>
|
|
119
|
+
<Body type={Typography.BODY_DEFAULT} className="m-t-3">
|
|
120
|
+
We're building the world's{' '}
|
|
121
|
+
<Link href="#" disabled>
|
|
122
|
+
most international account
|
|
123
|
+
</Link>
|
|
124
|
+
. We're building the world's most international account
|
|
69
125
|
</Body>
|
|
70
126
|
|
|
71
127
|
<Title type={Typography.TITLE_SCREEN} className="m-t-3">
|
|
72
128
|
Links via <code>{'<a>'}</code> tag in all types of body copy
|
|
73
129
|
</Title>
|
|
74
130
|
<Body type={Typography.BODY_LARGE_BOLD} className="m-t-3">
|
|
75
|
-
We
|
|
131
|
+
We're building the world's{' '}
|
|
76
132
|
<a href="#" target="_blank">
|
|
77
133
|
most international account
|
|
78
134
|
</a>
|
|
79
|
-
. We
|
|
135
|
+
. We're building the world's most international account
|
|
80
136
|
</Body>
|
|
81
137
|
<Body type={Typography.BODY_LARGE} className="m-t-3">
|
|
82
|
-
We
|
|
138
|
+
We're building the world's{' '}
|
|
83
139
|
<a href="#" target="_blank">
|
|
84
140
|
most international account
|
|
85
141
|
</a>
|
|
86
|
-
. We
|
|
142
|
+
. We're building the world's most international account
|
|
87
143
|
</Body>
|
|
88
144
|
<Body type={Typography.BODY_DEFAULT_BOLD} className="m-t-3">
|
|
89
|
-
We
|
|
145
|
+
We're building the world's{' '}
|
|
90
146
|
<a href="#" target="_blank">
|
|
91
147
|
most international account
|
|
92
148
|
</a>
|
|
93
|
-
. We
|
|
149
|
+
. We're building the world's most international account
|
|
94
150
|
</Body>
|
|
95
151
|
<Body type={Typography.BODY_DEFAULT} className="m-t-3">
|
|
96
|
-
We
|
|
152
|
+
We're building the world's{' '}
|
|
97
153
|
<a href="#" target="_blank">
|
|
98
154
|
most international account
|
|
99
155
|
</a>
|
|
100
|
-
. We
|
|
156
|
+
. We're building the world's most international account
|
|
101
157
|
</Body>
|
|
102
158
|
</>
|
|
103
159
|
);
|
package/src/link/Link.tsx
CHANGED
|
@@ -24,6 +24,7 @@ const Link = ({
|
|
|
24
24
|
type = Typography.LINK_DEFAULT,
|
|
25
25
|
'aria-label': ariaLabel,
|
|
26
26
|
onClick,
|
|
27
|
+
disabled,
|
|
27
28
|
...props
|
|
28
29
|
}: Props) => {
|
|
29
30
|
const { formatMessage } = useIntl();
|
|
@@ -35,6 +36,7 @@ const Link = ({
|
|
|
35
36
|
'd-inline-flex',
|
|
36
37
|
{
|
|
37
38
|
[`np-text-${type}`]: type,
|
|
39
|
+
'np-link--disabled': disabled,
|
|
38
40
|
},
|
|
39
41
|
className,
|
|
40
42
|
);
|
|
@@ -43,7 +45,8 @@ const Link = ({
|
|
|
43
45
|
<PrimitiveButton
|
|
44
46
|
type="button"
|
|
45
47
|
aria-label={ariaLabel}
|
|
46
|
-
className={clsx(classNames, 'btn-unstyled'
|
|
48
|
+
className={clsx(classNames, 'btn-unstyled')}
|
|
49
|
+
disabled={disabled}
|
|
47
50
|
onClick={onClick}
|
|
48
51
|
>
|
|
49
52
|
{children}
|
|
@@ -55,6 +58,7 @@ const Link = ({
|
|
|
55
58
|
className={classNames}
|
|
56
59
|
aria-label={ariaLabel}
|
|
57
60
|
rel={isBlank ? 'noreferrer' : undefined}
|
|
61
|
+
disabled={disabled}
|
|
58
62
|
onClick={onClick}
|
|
59
63
|
{...props}
|
|
60
64
|
>
|