@nice-digital/nds-hero 3.0.2-alpha.0 → 4.0.0-alpha.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/es/Hero.d.ts +14 -0
- package/es/Hero.js +25 -47
- package/es/Hero.test.d.ts +1 -0
- package/es/Hero.test.js +24 -0
- package/package.json +12 -12
- package/es/Hero.js.map +0 -1
- package/lib/Hero.js +0 -120
- package/lib/Hero.js.map +0 -1
- package/nds-hero.d.ts +0 -16
package/es/Hero.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "../scss/hero.scss";
|
|
3
|
+
export interface HeroProps {
|
|
4
|
+
[prop: string]: unknown;
|
|
5
|
+
actions?: React.ReactNode;
|
|
6
|
+
extra?: React.ReactNode;
|
|
7
|
+
footer?: React.ReactNode;
|
|
8
|
+
header?: React.ReactNode;
|
|
9
|
+
intro?: React.ReactNode;
|
|
10
|
+
title: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const Hero: React.FC<HeroProps>;
|
package/es/Hero.js
CHANGED
|
@@ -1,47 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
className: "hero__body"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}, /*#__PURE__*/React.createElement("h1", {
|
|
27
|
-
className: "hero__title"
|
|
28
|
-
}, title), intro && /*#__PURE__*/React.createElement("p", {
|
|
29
|
-
className: "hero__intro"
|
|
30
|
-
}, intro), actions && /*#__PURE__*/React.createElement("div", {
|
|
31
|
-
className: "hero__actions"
|
|
32
|
-
}, actions)), children && /*#__PURE__*/React.createElement("div", {
|
|
33
|
-
className: "hero__extra"
|
|
34
|
-
}, children)), footer && /*#__PURE__*/React.createElement("div", {
|
|
35
|
-
className: "hero__footer"
|
|
36
|
-
}, footer)));
|
|
37
|
-
};
|
|
38
|
-
Hero.propTypes = {
|
|
39
|
-
actions: PropTypes.node,
|
|
40
|
-
children: PropTypes.node,
|
|
41
|
-
className: PropTypes.string,
|
|
42
|
-
footer: PropTypes.node,
|
|
43
|
-
header: PropTypes.node,
|
|
44
|
-
intro: PropTypes.node,
|
|
45
|
-
title: PropTypes.node.isRequired
|
|
46
|
-
};
|
|
47
|
-
//# sourceMappingURL=Hero.js.map
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Hero = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
20
|
+
require("../scss/hero.scss");
|
|
21
|
+
const Hero = (props) => {
|
|
22
|
+
const { actions, children, footer, header, intro, title, className } = props, rest = __rest(props, ["actions", "children", "footer", "header", "intro", "title", "className"]);
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: (0, classnames_1.default)(["hero", className]) }, rest, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "hero__container" }, { children: [header && header, (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "hero__body" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "hero__copy" }, { children: [(0, jsx_runtime_1.jsx)("h1", Object.assign({ className: "hero__title" }, { children: title })), intro && (0, jsx_runtime_1.jsx)("p", Object.assign({ className: "hero__intro" }, { children: intro })), actions && (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "hero__actions" }, { children: actions }))] })), children && (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "hero__extra" }, { children: children }))] })), footer && (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "hero__footer" }, { children: footer }))] })) })));
|
|
24
|
+
};
|
|
25
|
+
exports.Hero = Hero;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/Hero.test.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const react_1 = require("@testing-library/react");
|
|
5
|
+
const Hero_1 = require("./Hero");
|
|
6
|
+
const actions = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("a", Object.assign({ href: "page-one" }, { children: "Go to page one" })), (0, jsx_runtime_1.jsx)("a", Object.assign({ href: "page-two" }, { children: "Go to page two" }))] }));
|
|
7
|
+
const header = (0, jsx_runtime_1.jsx)("p", { children: "Header content" });
|
|
8
|
+
const footer = (0, jsx_runtime_1.jsx)("p", { children: "Footer content" });
|
|
9
|
+
const extras = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("h2", { children: "Quick links" }), (0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("a", Object.assign({ href: "page-one" }, { children: "Go to page one" })) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("ul", { children: (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("a", Object.assign({ href: "page-two" }, { children: "Go to page two" })) }) }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("a", Object.assign({ href: "page-three" }, { children: "Go to page three" })) })] })] }));
|
|
10
|
+
describe("Hero", () => {
|
|
11
|
+
it("should match the snapshot with props", () => {
|
|
12
|
+
const wrapper = (0, react_1.render)((0, jsx_runtime_1.jsx)(Hero_1.Hero, Object.assign({ title: "Welcoming title", intro: "Introduction text", actions: actions, header: header, footer: footer }, { children: extras })));
|
|
13
|
+
expect(wrapper).toMatchSnapshot();
|
|
14
|
+
});
|
|
15
|
+
it("should pass any number of child components via actions and extra props ", () => {
|
|
16
|
+
var _a;
|
|
17
|
+
const wrapper = (0, react_1.render)((0, jsx_runtime_1.jsx)(Hero_1.Hero, Object.assign({ title: "Welcoming title", intro: "Introduction text", actions: actions, "data-track": false, className: "mt--0" }, { children: extras })));
|
|
18
|
+
const anchors = wrapper.getAllByRole("link", { name: "Go to page two" });
|
|
19
|
+
expect(anchors.length).toBe(2);
|
|
20
|
+
expect(anchors[anchors.length - 1].textContent).toBe("Go to page two");
|
|
21
|
+
expect((_a = wrapper.container.querySelector("div.hero")) === null || _a === void 0 ? void 0 : _a.getAttribute("data-track")).toBe("false");
|
|
22
|
+
expect(wrapper.container.querySelector("div.hero")).toHaveClass("mt--0");
|
|
23
|
+
});
|
|
24
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice-digital/nds-hero",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-alpha.0",
|
|
4
4
|
"description": "Hero component for the NICE Design System",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hero"
|
|
@@ -8,16 +8,12 @@
|
|
|
8
8
|
"author": "Ian Routledge <ian.routledge@nice.org.uk>",
|
|
9
9
|
"homepage": "https://design-system.nice.org.uk/",
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"
|
|
12
|
-
"main": "lib/Hero.js",
|
|
13
|
-
"module": "es/Hero.js",
|
|
11
|
+
"main": "es/Hero.js",
|
|
14
12
|
"style": "scss/hero.scss",
|
|
15
13
|
"directories": {
|
|
16
|
-
"lib": "lib",
|
|
17
14
|
"test": "__tests__"
|
|
18
15
|
},
|
|
19
16
|
"files": [
|
|
20
|
-
"lib",
|
|
21
17
|
"es",
|
|
22
18
|
"scss",
|
|
23
19
|
"*.d.ts"
|
|
@@ -37,16 +33,20 @@
|
|
|
37
33
|
"url": "https://github.com/nice-digital/nice-design-system/issues"
|
|
38
34
|
},
|
|
39
35
|
"dependencies": {
|
|
40
|
-
"@nice-digital/nds-core": "^
|
|
41
|
-
"classnames": "^2.3.1"
|
|
42
|
-
"prop-types": "^15.7.2"
|
|
36
|
+
"@nice-digital/nds-core": "^4.0.0-alpha.0",
|
|
37
|
+
"classnames": "^2.3.1"
|
|
43
38
|
},
|
|
44
39
|
"peerDependencies": {
|
|
45
40
|
"react": "^16 || ^17 || ^18",
|
|
46
41
|
"react-dom": "^16 || ^17 || ^18"
|
|
47
42
|
},
|
|
48
43
|
"devDependencies": {
|
|
49
|
-
"@
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
45
|
+
"@testing-library/react": "^13.4.0",
|
|
46
|
+
"@testing-library/user-event": "^14.4.3",
|
|
47
|
+
"@types/jest": "^29.2.2",
|
|
48
|
+
"@types/node": "^18.11.9",
|
|
49
|
+
"typescript": "^4.8.4"
|
|
50
|
+
},
|
|
51
|
+
"gitHead": "e225e0b15723013fb3df7309d197590a09cc2ea7"
|
|
52
52
|
}
|
package/es/Hero.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Hero.js","names":["React","PropTypes","classnames","Hero","props","actions","children","footer","header","intro","title","className","rest","propTypes","node","string","isRequired"],"sources":["../src/Hero.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport classnames from \"classnames\";\nimport \"../scss/hero.scss\";\n\nexport const Hero = (props) => {\n\tconst {\n\t\tactions,\n\t\tchildren,\n\t\tfooter,\n\t\theader,\n\t\tintro,\n\t\ttitle,\n\t\tclassName,\n\t\t...rest\n\t} = props;\n\treturn (\n\t\t<div className={classnames([\"hero\", className])} {...rest}>\n\t\t\t<div className=\"hero__container\">\n\t\t\t\t{header && header}\n\t\t\t\t<div className=\"hero__body\">\n\t\t\t\t\t<div className=\"hero__copy\">\n\t\t\t\t\t\t<h1 className=\"hero__title\">{title}</h1>\n\t\t\t\t\t\t{intro && <p className=\"hero__intro\">{intro}</p>}\n\t\t\t\t\t\t{actions && <div className=\"hero__actions\">{actions}</div>}\n\t\t\t\t\t</div>\n\t\t\t\t\t{children && <div className=\"hero__extra\">{children}</div>}\n\t\t\t\t</div>\n\t\t\t\t{footer && <div className=\"hero__footer\">{footer}</div>}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nHero.propTypes = {\n\tactions: PropTypes.node,\n\tchildren: PropTypes.node,\n\tclassName: PropTypes.string,\n\tfooter: PropTypes.node,\n\theader: PropTypes.node,\n\tintro: PropTypes.node,\n\ttitle: PropTypes.node.isRequired\n};\n"],"mappings":";;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAO,mBAAP;AAEA,OAAO,IAAMC,IAAI,GAAG,SAAPA,IAAO,CAACC,KAAD,EAAW;EAC9B,IACCC,OADD,GASID,KATJ,CACCC,OADD;EAAA,IAECC,QAFD,GASIF,KATJ,CAECE,QAFD;EAAA,IAGCC,MAHD,GASIH,KATJ,CAGCG,MAHD;EAAA,IAICC,MAJD,GASIJ,KATJ,CAICI,MAJD;EAAA,IAKCC,KALD,GASIL,KATJ,CAKCK,KALD;EAAA,IAMCC,KAND,GASIN,KATJ,CAMCM,KAND;EAAA,IAOCC,SAPD,GASIP,KATJ,CAOCO,SAPD;EAAA,IAQIC,IARJ,iCASIR,KATJ;;EAUA,oBACC;IAAK,SAAS,EAAEF,UAAU,CAAC,CAAC,MAAD,EAASS,SAAT,CAAD;EAA1B,GAAqDC,IAArD,gBACC;IAAK,SAAS,EAAC;EAAf,GACEJ,MAAM,IAAIA,MADZ,eAEC;IAAK,SAAS,EAAC;EAAf,gBACC;IAAK,SAAS,EAAC;EAAf,gBACC;IAAI,SAAS,EAAC;EAAd,GAA6BE,KAA7B,CADD,EAEED,KAAK,iBAAI;IAAG,SAAS,EAAC;EAAb,GAA4BA,KAA5B,CAFX,EAGEJ,OAAO,iBAAI;IAAK,SAAS,EAAC;EAAf,GAAgCA,OAAhC,CAHb,CADD,EAMEC,QAAQ,iBAAI;IAAK,SAAS,EAAC;EAAf,GAA8BA,QAA9B,CANd,CAFD,EAUEC,MAAM,iBAAI;IAAK,SAAS,EAAC;EAAf,GAA+BA,MAA/B,CAVZ,CADD,CADD;AAgBA,CA3BM;AA6BPJ,IAAI,CAACU,SAAL,GAAiB;EAChBR,OAAO,EAAEJ,SAAS,CAACa,IADH;EAEhBR,QAAQ,EAAEL,SAAS,CAACa,IAFJ;EAGhBH,SAAS,EAAEV,SAAS,CAACc,MAHL;EAIhBR,MAAM,EAAEN,SAAS,CAACa,IAJF;EAKhBN,MAAM,EAAEP,SAAS,CAACa,IALF;EAMhBL,KAAK,EAAER,SAAS,CAACa,IAND;EAOhBJ,KAAK,EAAET,SAAS,CAACa,IAAV,CAAeE;AAPN,CAAjB"}
|
package/lib/Hero.js
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
exports.__esModule = true;
|
|
6
|
-
exports.Hero = void 0;
|
|
7
|
-
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
|
|
10
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
|
|
16
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
|
-
|
|
18
|
-
require("../scss/hero.scss");
|
|
19
|
-
|
|
20
|
-
var _excluded = ["actions", "children", "footer", "header", "intro", "title", "className"];
|
|
21
|
-
|
|
22
|
-
var _jsxFileName = "C:\\dev\\nice-design-system\\components\\nds-hero\\src\\Hero.js",
|
|
23
|
-
_this = void 0;
|
|
24
|
-
|
|
25
|
-
var Hero = function Hero(props) {
|
|
26
|
-
var actions = props.actions,
|
|
27
|
-
children = props.children,
|
|
28
|
-
footer = props.footer,
|
|
29
|
-
header = props.header,
|
|
30
|
-
intro = props.intro,
|
|
31
|
-
title = props.title,
|
|
32
|
-
className = props.className,
|
|
33
|
-
rest = (0, _objectWithoutPropertiesLoose2["default"])(props, _excluded);
|
|
34
|
-
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
35
|
-
className: (0, _classnames["default"])(["hero", className])
|
|
36
|
-
}, rest, {
|
|
37
|
-
__self: _this,
|
|
38
|
-
__source: {
|
|
39
|
-
fileName: _jsxFileName,
|
|
40
|
-
lineNumber: 18,
|
|
41
|
-
columnNumber: 3
|
|
42
|
-
}
|
|
43
|
-
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
44
|
-
className: "hero__container",
|
|
45
|
-
__self: _this,
|
|
46
|
-
__source: {
|
|
47
|
-
fileName: _jsxFileName,
|
|
48
|
-
lineNumber: 19,
|
|
49
|
-
columnNumber: 4
|
|
50
|
-
}
|
|
51
|
-
}, header && header, /*#__PURE__*/_react["default"].createElement("div", {
|
|
52
|
-
className: "hero__body",
|
|
53
|
-
__self: _this,
|
|
54
|
-
__source: {
|
|
55
|
-
fileName: _jsxFileName,
|
|
56
|
-
lineNumber: 21,
|
|
57
|
-
columnNumber: 5
|
|
58
|
-
}
|
|
59
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
60
|
-
className: "hero__copy",
|
|
61
|
-
__self: _this,
|
|
62
|
-
__source: {
|
|
63
|
-
fileName: _jsxFileName,
|
|
64
|
-
lineNumber: 22,
|
|
65
|
-
columnNumber: 6
|
|
66
|
-
}
|
|
67
|
-
}, /*#__PURE__*/_react["default"].createElement("h1", {
|
|
68
|
-
className: "hero__title",
|
|
69
|
-
__self: _this,
|
|
70
|
-
__source: {
|
|
71
|
-
fileName: _jsxFileName,
|
|
72
|
-
lineNumber: 23,
|
|
73
|
-
columnNumber: 7
|
|
74
|
-
}
|
|
75
|
-
}, title), intro && /*#__PURE__*/_react["default"].createElement("p", {
|
|
76
|
-
className: "hero__intro",
|
|
77
|
-
__self: _this,
|
|
78
|
-
__source: {
|
|
79
|
-
fileName: _jsxFileName,
|
|
80
|
-
lineNumber: 24,
|
|
81
|
-
columnNumber: 17
|
|
82
|
-
}
|
|
83
|
-
}, intro), actions && /*#__PURE__*/_react["default"].createElement("div", {
|
|
84
|
-
className: "hero__actions",
|
|
85
|
-
__self: _this,
|
|
86
|
-
__source: {
|
|
87
|
-
fileName: _jsxFileName,
|
|
88
|
-
lineNumber: 25,
|
|
89
|
-
columnNumber: 19
|
|
90
|
-
}
|
|
91
|
-
}, actions)), children && /*#__PURE__*/_react["default"].createElement("div", {
|
|
92
|
-
className: "hero__extra",
|
|
93
|
-
__self: _this,
|
|
94
|
-
__source: {
|
|
95
|
-
fileName: _jsxFileName,
|
|
96
|
-
lineNumber: 27,
|
|
97
|
-
columnNumber: 19
|
|
98
|
-
}
|
|
99
|
-
}, children)), footer && /*#__PURE__*/_react["default"].createElement("div", {
|
|
100
|
-
className: "hero__footer",
|
|
101
|
-
__self: _this,
|
|
102
|
-
__source: {
|
|
103
|
-
fileName: _jsxFileName,
|
|
104
|
-
lineNumber: 29,
|
|
105
|
-
columnNumber: 16
|
|
106
|
-
}
|
|
107
|
-
}, footer)));
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
exports.Hero = Hero;
|
|
111
|
-
Hero.propTypes = {
|
|
112
|
-
actions: _propTypes["default"].node,
|
|
113
|
-
children: _propTypes["default"].node,
|
|
114
|
-
className: _propTypes["default"].string,
|
|
115
|
-
footer: _propTypes["default"].node,
|
|
116
|
-
header: _propTypes["default"].node,
|
|
117
|
-
intro: _propTypes["default"].node,
|
|
118
|
-
title: _propTypes["default"].node.isRequired
|
|
119
|
-
};
|
|
120
|
-
//# sourceMappingURL=Hero.js.map
|
package/lib/Hero.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Hero.js","names":["Hero","props","actions","children","footer","header","intro","title","className","rest","classnames","propTypes","PropTypes","node","string","isRequired"],"sources":["../src/Hero.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport classnames from \"classnames\";\nimport \"../scss/hero.scss\";\n\nexport const Hero = (props) => {\n\tconst {\n\t\tactions,\n\t\tchildren,\n\t\tfooter,\n\t\theader,\n\t\tintro,\n\t\ttitle,\n\t\tclassName,\n\t\t...rest\n\t} = props;\n\treturn (\n\t\t<div className={classnames([\"hero\", className])} {...rest}>\n\t\t\t<div className=\"hero__container\">\n\t\t\t\t{header && header}\n\t\t\t\t<div className=\"hero__body\">\n\t\t\t\t\t<div className=\"hero__copy\">\n\t\t\t\t\t\t<h1 className=\"hero__title\">{title}</h1>\n\t\t\t\t\t\t{intro && <p className=\"hero__intro\">{intro}</p>}\n\t\t\t\t\t\t{actions && <div className=\"hero__actions\">{actions}</div>}\n\t\t\t\t\t</div>\n\t\t\t\t\t{children && <div className=\"hero__extra\">{children}</div>}\n\t\t\t\t</div>\n\t\t\t\t{footer && <div className=\"hero__footer\">{footer}</div>}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nHero.propTypes = {\n\tactions: PropTypes.node,\n\tchildren: PropTypes.node,\n\tclassName: PropTypes.string,\n\tfooter: PropTypes.node,\n\theader: PropTypes.node,\n\tintro: PropTypes.node,\n\ttitle: PropTypes.node.isRequired\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;AAEO,IAAMA,IAAI,GAAG,SAAPA,IAAO,CAACC,KAAD,EAAW;EAC9B,IACCC,OADD,GASID,KATJ,CACCC,OADD;EAAA,IAECC,QAFD,GASIF,KATJ,CAECE,QAFD;EAAA,IAGCC,MAHD,GASIH,KATJ,CAGCG,MAHD;EAAA,IAICC,MAJD,GASIJ,KATJ,CAICI,MAJD;EAAA,IAKCC,KALD,GASIL,KATJ,CAKCK,KALD;EAAA,IAMCC,KAND,GASIN,KATJ,CAMCM,KAND;EAAA,IAOCC,SAPD,GASIP,KATJ,CAOCO,SAPD;EAAA,IAQIC,IARJ,kDASIR,KATJ;EAUA,oBACC;IAAK,SAAS,EAAE,IAAAS,sBAAA,EAAW,CAAC,MAAD,EAASF,SAAT,CAAX;EAAhB,GAAqDC,IAArD;IAAA;IAAA;MAAA;MAAA;MAAA;IAAA;EAAA,iBACC;IAAK,SAAS,EAAC,iBAAf;IAAA;IAAA;MAAA;MAAA;MAAA;IAAA;EAAA,GACEJ,MAAM,IAAIA,MADZ,eAEC;IAAK,SAAS,EAAC,YAAf;IAAA;IAAA;MAAA;MAAA;MAAA;IAAA;EAAA,gBACC;IAAK,SAAS,EAAC,YAAf;IAAA;IAAA;MAAA;MAAA;MAAA;IAAA;EAAA,gBACC;IAAI,SAAS,EAAC,aAAd;IAAA;IAAA;MAAA;MAAA;MAAA;IAAA;EAAA,GAA6BE,KAA7B,CADD,EAEED,KAAK,iBAAI;IAAG,SAAS,EAAC,aAAb;IAAA;IAAA;MAAA;MAAA;MAAA;IAAA;EAAA,GAA4BA,KAA5B,CAFX,EAGEJ,OAAO,iBAAI;IAAK,SAAS,EAAC,eAAf;IAAA;IAAA;MAAA;MAAA;MAAA;IAAA;EAAA,GAAgCA,OAAhC,CAHb,CADD,EAMEC,QAAQ,iBAAI;IAAK,SAAS,EAAC,aAAf;IAAA;IAAA;MAAA;MAAA;MAAA;IAAA;EAAA,GAA8BA,QAA9B,CANd,CAFD,EAUEC,MAAM,iBAAI;IAAK,SAAS,EAAC,cAAf;IAAA;IAAA;MAAA;MAAA;MAAA;IAAA;EAAA,GAA+BA,MAA/B,CAVZ,CADD,CADD;AAgBA,CA3BM;;;AA6BPJ,IAAI,CAACW,SAAL,GAAiB;EAChBT,OAAO,EAAEU,qBAAA,CAAUC,IADH;EAEhBV,QAAQ,EAAES,qBAAA,CAAUC,IAFJ;EAGhBL,SAAS,EAAEI,qBAAA,CAAUE,MAHL;EAIhBV,MAAM,EAAEQ,qBAAA,CAAUC,IAJF;EAKhBR,MAAM,EAAEO,qBAAA,CAAUC,IALF;EAMhBP,KAAK,EAAEM,qBAAA,CAAUC,IAND;EAOhBN,KAAK,EAAEK,qBAAA,CAAUC,IAAV,CAAeE;AAPN,CAAjB"}
|
package/nds-hero.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
declare module "@nice-digital/nds-hero" {
|
|
2
|
-
import React = require("react");
|
|
3
|
-
|
|
4
|
-
export interface HeroProps {
|
|
5
|
-
[prop: string]: unknown;
|
|
6
|
-
actions?: React.ReactNode;
|
|
7
|
-
extra?: React.ReactNode;
|
|
8
|
-
footer?: React.ReactNode;
|
|
9
|
-
header?: React.ReactNode;
|
|
10
|
-
intro?: React.ReactNode;
|
|
11
|
-
title: React.ReactNode;
|
|
12
|
-
className?: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const Hero: React.FC<HeroProps>;
|
|
16
|
-
}
|