scoobie 14.0.0 → 14.1.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/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"version": "14.
|
|
7
|
+
"version": "14.1.0",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@capsizecss/core": "^3.0.0",
|
|
10
10
|
"@mdx-js/loader": "^1.6.22",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"svgo-loader": "^3.0.0",
|
|
29
29
|
"unist-util-visit": "^2.0.3",
|
|
30
30
|
"webpack-merge": "^5.8.0",
|
|
31
|
-
"which": "^
|
|
31
|
+
"which": "^3.0.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@mermaid-js/mermaid-cli": "9.1.6",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@storybook/storybook-deployer": "2.8.12",
|
|
37
37
|
"@types/react": "18.0.17",
|
|
38
38
|
"@types/react-dom": "18.0.6",
|
|
39
|
-
"braid-design-system": "31.
|
|
39
|
+
"braid-design-system": "31.22.1",
|
|
40
40
|
"loki": "0.30.3",
|
|
41
41
|
"react": "18.2.0",
|
|
42
42
|
"react-dom": "18.2.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TextLink } from 'braid-design-system';
|
|
2
|
-
import React, { ReactNode } from 'react';
|
|
2
|
+
import React, { ComponentProps, ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
import { ExternalTextLink } from '../private/ExternalTextLink';
|
|
5
5
|
import { isExternalHref } from '../private/url';
|
|
@@ -7,16 +7,17 @@ import { isExternalHref } from '../private/url';
|
|
|
7
7
|
interface Props {
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
href: string;
|
|
10
|
+
icon?: ComponentProps<typeof TextLink>['icon'];
|
|
10
11
|
title?: string;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
export const SmartTextLink = ({ children, href, title }: Props) =>
|
|
14
|
+
export const SmartTextLink = ({ children, href, icon, title }: Props) =>
|
|
14
15
|
isExternalHref(href) ? (
|
|
15
|
-
<ExternalTextLink href={href} title={title}>
|
|
16
|
+
<ExternalTextLink href={href} icon={icon} title={title}>
|
|
16
17
|
{children}
|
|
17
18
|
</ExternalTextLink>
|
|
18
19
|
) : (
|
|
19
|
-
<TextLink href={href} title={title}>
|
|
20
|
+
<TextLink href={href} icon={icon} title={title}>
|
|
20
21
|
{children}
|
|
21
22
|
</TextLink>
|
|
22
23
|
);
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import { IconNewWindow, TextLink } from 'braid-design-system';
|
|
2
|
-
import React, { ReactNode } from 'react';
|
|
2
|
+
import React, { ComponentProps, ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
interface Props {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
href: string;
|
|
7
|
+
icon?: ComponentProps<typeof TextLink>['icon'];
|
|
7
8
|
title?: string;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
export const ExternalTextLink = ({ children, href, title }: Props) => (
|
|
11
|
-
<TextLink
|
|
11
|
+
export const ExternalTextLink = ({ children, href, icon, title }: Props) => (
|
|
12
|
+
<TextLink
|
|
13
|
+
href={href}
|
|
14
|
+
icon={icon}
|
|
15
|
+
rel="noreferrer"
|
|
16
|
+
target="_blank"
|
|
17
|
+
title={title}
|
|
18
|
+
>
|
|
12
19
|
{children} <IconNewWindow alignY="lowercase" />
|
|
13
20
|
</TextLink>
|
|
14
21
|
);
|