@digigov/react-core 2.0.0-rc.22 → 2.0.0-rc.23
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/BreadcrumbsListItem/index.js +3 -1
- package/BreadcrumbsListItem/index.js.map +2 -2
- package/LinkBase/index.d.ts +8 -0
- package/LinkBase/index.js +2 -2
- package/LinkBase/index.js.map +2 -2
- package/cjs/BreadcrumbsListItem/index.js +3 -1
- package/cjs/BreadcrumbsListItem/index.js.map +3 -3
- package/cjs/LinkBase/index.js +2 -2
- package/cjs/LinkBase/index.js.map +2 -2
- package/index.js +1 -1
- package/package.json +3 -3
- package/src/BreadcrumbsListItem/index.tsx +4 -2
- package/src/LinkBase/index.tsx +10 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import Base from "@digigov/react-core/Base";
|
|
4
|
+
import Link from "@digigov/react-core/LinkBase";
|
|
4
5
|
const BreadcrumbsListItem = React.forwardRef(function BreadcrumbsListItem2({ href, className, children, ...props }, ref) {
|
|
5
6
|
return /* @__PURE__ */ React.createElement(
|
|
6
7
|
Base,
|
|
@@ -13,9 +14,10 @@ const BreadcrumbsListItem = React.forwardRef(function BreadcrumbsListItem2({ hre
|
|
|
13
14
|
...props
|
|
14
15
|
},
|
|
15
16
|
/* @__PURE__ */ React.createElement(
|
|
16
|
-
|
|
17
|
+
Link,
|
|
17
18
|
{
|
|
18
19
|
href,
|
|
20
|
+
defaultStyle: false,
|
|
19
21
|
className: clsx({
|
|
20
22
|
"ds-breadcrumbs__link": true,
|
|
21
23
|
"ds-breadcrumbs__link--inactive": href === void 0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/BreadcrumbsListItem/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface BreadcrumbsListItemProps extends BaseProps<'li'> {\n /**\n * href is optional and provides the text and url of the Breadcrumbs items.\n\n */\n href?: string;\n}\n/**\n * BreadcrumbsListItem creates a list of items with the possibility of navigation.\n * It should be used inside BreadcrumbsList as children component\n */\nexport const BreadcrumbsListItem = React.forwardRef<\n HTMLLIElement,\n BreadcrumbsListItemProps\n>(function BreadcrumbsListItem({ href, className, children, ...props }, ref) {\n return (\n <Base\n as=\"li\"\n ref={ref}\n className={clsx(className, {\n 'ds-breadcrumbs__list-item': true,\n })}\n {...props}\n >\n <
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport Link from '@digigov/react-core/LinkBase';\n\nexport interface BreadcrumbsListItemProps extends BaseProps<'li'> {\n /**\n * href is optional and provides the text and url of the Breadcrumbs items.\n\n */\n href?: string;\n}\n/**\n * BreadcrumbsListItem creates a list of items with the possibility of navigation.\n * It should be used inside BreadcrumbsList as children component\n */\nexport const BreadcrumbsListItem = React.forwardRef<\n HTMLLIElement,\n BreadcrumbsListItemProps\n>(function BreadcrumbsListItem({ href, className, children, ...props }, ref) {\n return (\n <Base\n as=\"li\"\n ref={ref}\n className={clsx(className, {\n 'ds-breadcrumbs__list-item': true,\n })}\n {...props}\n >\n <Link\n href={href}\n defaultStyle={false}\n className={clsx({\n 'ds-breadcrumbs__link': true,\n 'ds-breadcrumbs__link--inactive': href === undefined,\n })}\n >\n {children}\n </Link>\n </Base>\n );\n});\n\nexport default BreadcrumbsListItem;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAChC,OAAO,UAAU;AAaV,MAAM,sBAAsB,MAAM,WAGvC,SAASA,qBAAoB,EAAE,MAAM,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AAC3E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,6BAA6B;AAAA,MAC/B,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEJ;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,cAAc;AAAA,QACd,WAAW,KAAK;AAAA,UACd,wBAAwB;AAAA,UACxB,kCAAkC,SAAS;AAAA,QAC7C,CAAC;AAAA;AAAA,MAEA;AAAA,IACH;AAAA,EACF;AAEJ,CAAC;AAED,IAAO,8BAAQ;",
|
|
6
6
|
"names": ["BreadcrumbsListItem"]
|
|
7
7
|
}
|
package/LinkBase/index.d.ts
CHANGED
|
@@ -8,6 +8,14 @@ export interface LinkBaseProps extends BaseProps<'a'> {
|
|
|
8
8
|
* @value false
|
|
9
9
|
*/
|
|
10
10
|
underline?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* defaultStyle is optional. The default value is 'true'.
|
|
13
|
+
* Make it 'false' only if you need to use a link with different style, and the default style clashes over with your
|
|
14
|
+
* custom styles. For example, BreadcrumbsListItem is a link but it has a different styling.
|
|
15
|
+
* @value true
|
|
16
|
+
* @value false
|
|
17
|
+
*/
|
|
18
|
+
defaultStyle?: boolean;
|
|
11
19
|
}
|
|
12
20
|
/**
|
|
13
21
|
* This component defines a hyperlink, which is used to link from one page to another.
|
package/LinkBase/index.js
CHANGED
|
@@ -2,14 +2,14 @@ import React from "react";
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import Base from "@digigov/react-core/Base";
|
|
4
4
|
const LinkBase = React.forwardRef(
|
|
5
|
-
function LinkBase2({ underline = true, className, children, ...props }, ref) {
|
|
5
|
+
function LinkBase2({ underline = true, defaultStyle = true, className, children, ...props }, ref) {
|
|
6
6
|
return /* @__PURE__ */ React.createElement(
|
|
7
7
|
Base,
|
|
8
8
|
{
|
|
9
9
|
as: "a",
|
|
10
10
|
ref,
|
|
11
11
|
className: clsx(className, {
|
|
12
|
-
"ds-link":
|
|
12
|
+
"ds-link": defaultStyle,
|
|
13
13
|
"ds-link--no-underline": !underline
|
|
14
14
|
}),
|
|
15
15
|
...props
|
package/LinkBase/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/LinkBase/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface LinkBaseProps extends BaseProps<'a'> {\n /**\n * underline is optional. The default value is 'true'.\n * Make it 'false' only if the context tells the user that the text is a link, even without the underline.\n * @value true\n * @value false\n */\n underline?: boolean;\n}\n/**\n * This component defines a hyperlink, which is used to link from one page to another.\n */\nexport const LinkBase = React.forwardRef<HTMLAnchorElement, LinkBaseProps>(\n function LinkBase({ underline = true, className, children, ...props }, ref) {\n return (\n <Base\n as=\"a\"\n ref={ref}\n className={clsx(className, {\n 'ds-link':
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface LinkBaseProps extends BaseProps<'a'> {\n /**\n * underline is optional. The default value is 'true'.\n * Make it 'false' only if the context tells the user that the text is a link, even without the underline.\n * @value true\n * @value false\n */\n underline?: boolean;\n /**\n * defaultStyle is optional. The default value is 'true'.\n * Make it 'false' only if you need to use a link with different style, and the default style clashes over with your\n * custom styles. For example, BreadcrumbsListItem is a link but it has a different styling.\n * @value true\n * @value false\n */\n defaultStyle?: boolean;\n}\n/**\n * This component defines a hyperlink, which is used to link from one page to another.\n */\nexport const LinkBase = React.forwardRef<HTMLAnchorElement, LinkBaseProps>(\n function LinkBase({ underline = true, defaultStyle = true, className, children, ...props }, ref) {\n return (\n <Base\n as=\"a\"\n ref={ref}\n className={clsx(className, {\n 'ds-link': defaultStyle,\n 'ds-link--no-underline': !underline,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default LinkBase;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAsBzB,MAAM,WAAW,MAAM;AAAA,EAC5B,SAASA,UAAS,EAAE,YAAY,MAAM,eAAe,MAAM,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AAC/F,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,WAAW;AAAA,UACX,yBAAyB,CAAC;AAAA,QAC5B,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,mBAAQ;",
|
|
6
6
|
"names": ["LinkBase"]
|
|
7
7
|
}
|
|
@@ -34,6 +34,7 @@ module.exports = __toCommonJS(BreadcrumbsListItem_exports);
|
|
|
34
34
|
var import_react = __toESM(require("react"));
|
|
35
35
|
var import_clsx = __toESM(require("clsx"));
|
|
36
36
|
var import_Base = __toESM(require("@digigov/react-core/Base"));
|
|
37
|
+
var import_LinkBase = __toESM(require("@digigov/react-core/LinkBase"));
|
|
37
38
|
const BreadcrumbsListItem = import_react.default.forwardRef(function BreadcrumbsListItem2({ href, className, children, ...props }, ref) {
|
|
38
39
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
39
40
|
import_Base.default,
|
|
@@ -46,9 +47,10 @@ const BreadcrumbsListItem = import_react.default.forwardRef(function Breadcrumbs
|
|
|
46
47
|
...props
|
|
47
48
|
},
|
|
48
49
|
/* @__PURE__ */ import_react.default.createElement(
|
|
49
|
-
|
|
50
|
+
import_LinkBase.default,
|
|
50
51
|
{
|
|
51
52
|
href,
|
|
53
|
+
defaultStyle: false,
|
|
52
54
|
className: (0, import_clsx.default)({
|
|
53
55
|
"ds-breadcrumbs__link": true,
|
|
54
56
|
"ds-breadcrumbs__link--inactive": href === void 0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/BreadcrumbsListItem/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface BreadcrumbsListItemProps extends BaseProps<'li'> {\n /**\n * href is optional and provides the text and url of the Breadcrumbs items.\n\n */\n href?: string;\n}\n/**\n * BreadcrumbsListItem creates a list of items with the possibility of navigation.\n * It should be used inside BreadcrumbsList as children component\n */\nexport const BreadcrumbsListItem = React.forwardRef<\n HTMLLIElement,\n BreadcrumbsListItemProps\n>(function BreadcrumbsListItem({ href, className, children, ...props }, ref) {\n return (\n <Base\n as=\"li\"\n ref={ref}\n className={clsx(className, {\n 'ds-breadcrumbs__list-item': true,\n })}\n {...props}\n >\n <
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;
|
|
6
|
-
"names": ["React", "BreadcrumbsListItem", "Base", "clsx"]
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport Link from '@digigov/react-core/LinkBase';\n\nexport interface BreadcrumbsListItemProps extends BaseProps<'li'> {\n /**\n * href is optional and provides the text and url of the Breadcrumbs items.\n\n */\n href?: string;\n}\n/**\n * BreadcrumbsListItem creates a list of items with the possibility of navigation.\n * It should be used inside BreadcrumbsList as children component\n */\nexport const BreadcrumbsListItem = React.forwardRef<\n HTMLLIElement,\n BreadcrumbsListItemProps\n>(function BreadcrumbsListItem({ href, className, children, ...props }, ref) {\n return (\n <Base\n as=\"li\"\n ref={ref}\n className={clsx(className, {\n 'ds-breadcrumbs__list-item': true,\n })}\n {...props}\n >\n <Link\n href={href}\n defaultStyle={false}\n className={clsx({\n 'ds-breadcrumbs__link': true,\n 'ds-breadcrumbs__link--inactive': href === undefined,\n })}\n >\n {children}\n </Link>\n </Base>\n );\n});\n\nexport default BreadcrumbsListItem;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAChC,sBAAiB;AAaV,MAAM,sBAAsB,aAAAA,QAAM,WAGvC,SAASC,qBAAoB,EAAE,MAAM,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AAC3E,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,6BAA6B;AAAA,MAC/B,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEJ,6BAAAH,QAAA;AAAA,MAAC,gBAAAI;AAAA,MAAA;AAAA,QACC;AAAA,QACA,cAAc;AAAA,QACd,eAAW,YAAAD,SAAK;AAAA,UACd,wBAAwB;AAAA,UACxB,kCAAkC,SAAS;AAAA,QAC7C,CAAC;AAAA;AAAA,MAEA;AAAA,IACH;AAAA,EACF;AAEJ,CAAC;AAED,IAAO,8BAAQ;",
|
|
6
|
+
"names": ["React", "BreadcrumbsListItem", "Base", "clsx", "Link"]
|
|
7
7
|
}
|
package/cjs/LinkBase/index.js
CHANGED
|
@@ -35,14 +35,14 @@ var import_react = __toESM(require("react"));
|
|
|
35
35
|
var import_clsx = __toESM(require("clsx"));
|
|
36
36
|
var import_Base = __toESM(require("@digigov/react-core/Base"));
|
|
37
37
|
const LinkBase = import_react.default.forwardRef(
|
|
38
|
-
function LinkBase2({ underline = true, className, children, ...props }, ref) {
|
|
38
|
+
function LinkBase2({ underline = true, defaultStyle = true, className, children, ...props }, ref) {
|
|
39
39
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
40
40
|
import_Base.default,
|
|
41
41
|
{
|
|
42
42
|
as: "a",
|
|
43
43
|
ref,
|
|
44
44
|
className: (0, import_clsx.default)(className, {
|
|
45
|
-
"ds-link":
|
|
45
|
+
"ds-link": defaultStyle,
|
|
46
46
|
"ds-link--no-underline": !underline
|
|
47
47
|
}),
|
|
48
48
|
...props
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/LinkBase/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface LinkBaseProps extends BaseProps<'a'> {\n /**\n * underline is optional. The default value is 'true'.\n * Make it 'false' only if the context tells the user that the text is a link, even without the underline.\n * @value true\n * @value false\n */\n underline?: boolean;\n}\n/**\n * This component defines a hyperlink, which is used to link from one page to another.\n */\nexport const LinkBase = React.forwardRef<HTMLAnchorElement, LinkBaseProps>(\n function LinkBase({ underline = true, className, children, ...props }, ref) {\n return (\n <Base\n as=\"a\"\n ref={ref}\n className={clsx(className, {\n 'ds-link':
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface LinkBaseProps extends BaseProps<'a'> {\n /**\n * underline is optional. The default value is 'true'.\n * Make it 'false' only if the context tells the user that the text is a link, even without the underline.\n * @value true\n * @value false\n */\n underline?: boolean;\n /**\n * defaultStyle is optional. The default value is 'true'.\n * Make it 'false' only if you need to use a link with different style, and the default style clashes over with your\n * custom styles. For example, BreadcrumbsListItem is a link but it has a different styling.\n * @value true\n * @value false\n */\n defaultStyle?: boolean;\n}\n/**\n * This component defines a hyperlink, which is used to link from one page to another.\n */\nexport const LinkBase = React.forwardRef<HTMLAnchorElement, LinkBaseProps>(\n function LinkBase({ underline = true, defaultStyle = true, className, children, ...props }, ref) {\n return (\n <Base\n as=\"a\"\n ref={ref}\n className={clsx(className, {\n 'ds-link': defaultStyle,\n 'ds-link--no-underline': !underline,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default LinkBase;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAsBzB,MAAM,WAAW,aAAAA,QAAM;AAAA,EAC5B,SAASC,UAAS,EAAE,YAAY,MAAM,eAAe,MAAM,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AAC/F,WACE,6BAAAD,QAAA;AAAA,MAAC,YAAAE;AAAA,MAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,eAAW,YAAAC,SAAK,WAAW;AAAA,UACzB,WAAW;AAAA,UACX,yBAAyB,CAAC;AAAA,QAC5B,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,mBAAQ;",
|
|
6
6
|
"names": ["React", "LinkBase", "Base", "clsx"]
|
|
7
7
|
}
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digigov/react-core",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.23",
|
|
4
4
|
"description": "@digigov react core components",
|
|
5
5
|
"author": "GRNET Developers <devs@lists.grnet.gr>",
|
|
6
6
|
"license": "BSD-2-Clause",
|
|
7
7
|
"main": "./cjs/index.js",
|
|
8
8
|
"module": "./index.js",
|
|
9
9
|
"peerDependencies": {
|
|
10
|
-
"@digigov/css": "2.0.0-rc.
|
|
11
|
-
"@digigov/react-icons": "2.0.0-rc.
|
|
10
|
+
"@digigov/css": "2.0.0-rc.23",
|
|
11
|
+
"@digigov/react-icons": "2.0.0-rc.23",
|
|
12
12
|
"clsx": "1.1.1",
|
|
13
13
|
"react": ">=16.8.0 <19.0.0",
|
|
14
14
|
"react-dom": ">=16.8.0 <19.0.0",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
+
import Link from '@digigov/react-core/LinkBase';
|
|
4
5
|
|
|
5
6
|
export interface BreadcrumbsListItemProps extends BaseProps<'li'> {
|
|
6
7
|
/**
|
|
@@ -26,15 +27,16 @@ export const BreadcrumbsListItem = React.forwardRef<
|
|
|
26
27
|
})}
|
|
27
28
|
{...props}
|
|
28
29
|
>
|
|
29
|
-
<
|
|
30
|
+
<Link
|
|
30
31
|
href={href}
|
|
32
|
+
defaultStyle={false}
|
|
31
33
|
className={clsx({
|
|
32
34
|
'ds-breadcrumbs__link': true,
|
|
33
35
|
'ds-breadcrumbs__link--inactive': href === undefined,
|
|
34
36
|
})}
|
|
35
37
|
>
|
|
36
38
|
{children}
|
|
37
|
-
</
|
|
39
|
+
</Link>
|
|
38
40
|
</Base>
|
|
39
41
|
);
|
|
40
42
|
});
|
package/src/LinkBase/index.tsx
CHANGED
|
@@ -10,18 +10,26 @@ export interface LinkBaseProps extends BaseProps<'a'> {
|
|
|
10
10
|
* @value false
|
|
11
11
|
*/
|
|
12
12
|
underline?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* defaultStyle is optional. The default value is 'true'.
|
|
15
|
+
* Make it 'false' only if you need to use a link with different style, and the default style clashes over with your
|
|
16
|
+
* custom styles. For example, BreadcrumbsListItem is a link but it has a different styling.
|
|
17
|
+
* @value true
|
|
18
|
+
* @value false
|
|
19
|
+
*/
|
|
20
|
+
defaultStyle?: boolean;
|
|
13
21
|
}
|
|
14
22
|
/**
|
|
15
23
|
* This component defines a hyperlink, which is used to link from one page to another.
|
|
16
24
|
*/
|
|
17
25
|
export const LinkBase = React.forwardRef<HTMLAnchorElement, LinkBaseProps>(
|
|
18
|
-
function LinkBase({ underline = true, className, children, ...props }, ref) {
|
|
26
|
+
function LinkBase({ underline = true, defaultStyle = true, className, children, ...props }, ref) {
|
|
19
27
|
return (
|
|
20
28
|
<Base
|
|
21
29
|
as="a"
|
|
22
30
|
ref={ref}
|
|
23
31
|
className={clsx(className, {
|
|
24
|
-
'ds-link':
|
|
32
|
+
'ds-link': defaultStyle,
|
|
25
33
|
'ds-link--no-underline': !underline,
|
|
26
34
|
})}
|
|
27
35
|
{...props}
|