namirasoft-site-react 1.3.86 → 1.3.88
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/dist/App.js +8 -3
- package/dist/App.js.map +1 -1
- package/dist/components/NSCard.js +3 -2
- package/dist/components/NSCard.js.map +1 -1
- package/dist/components/NSCard.module.css +2 -0
- package/dist/components/NSLayout.js +1 -1
- package/dist/components/NSLayout.js.map +1 -1
- package/dist/components/NSLayout.module.css +11 -0
- package/dist/components/NSLink.module.css +1 -0
- package/dist/components/NSTabBar.d.ts +11 -0
- package/dist/components/NSTabBar.js +11 -0
- package/dist/components/NSTabBar.js.map +1 -0
- package/dist/components/NSTabBar.module.css +35 -0
- package/dist/components/NSTitle.module.css +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
- package/src/App.tsx +8 -1
- package/src/components/NSCard.module.css +2 -0
- package/src/components/NSCard.tsx +3 -1
- package/src/components/NSLayout.module.css +11 -0
- package/src/components/NSLayout.tsx +1 -1
- package/src/components/NSLink.module.css +1 -0
- package/src/components/NSTabBar.module.css +35 -0
- package/src/components/NSTabBar.tsx +41 -0
- package/src/components/NSTitle.module.css +1 -1
- package/src/main.ts +1 -0
package/dist/App.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import './App.css';
|
|
3
3
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
4
|
-
import { NSFooter, NSHeader, NSTable } from './main';
|
|
4
|
+
import { NSFooter, NSHeader, NSTable, NSTabBar } from './main';
|
|
5
5
|
import { useRef } from 'react';
|
|
6
6
|
export function App() {
|
|
7
|
+
const tabs = [
|
|
8
|
+
{ label: 'Information', content: _jsx("p", { children: "Content for Tab 1" }) },
|
|
9
|
+
{ label: 'Price History', content: _jsx("p", { children: "Content for Tab 2" }) },
|
|
10
|
+
{ label: 'Price Estimator', content: _jsx("p", { children: "Content for Tab 3" }) }
|
|
11
|
+
];
|
|
7
12
|
let columns = {
|
|
8
13
|
"id": "ID",
|
|
9
14
|
"project": "Project",
|
|
@@ -33,6 +38,6 @@ export function App() {
|
|
|
33
38
|
return row[column];
|
|
34
39
|
}
|
|
35
40
|
let table = useRef(null);
|
|
36
|
-
return (_jsxs(_Fragment, { children: [_jsx(NSHeader, { name: 'Header', scope: 'Namira Software Corporation', logo: 'https://static.namirasoft.com/image/namirasoft/site/logo/base.png', account: false, style: { backgroundColor: "transparent !important" } }),
|
|
41
|
+
return (_jsxs(_Fragment, { children: [_jsx(NSHeader, { name: 'Header', scope: 'Namira Software Corporation', logo: 'https://static.namirasoft.com/image/namirasoft/site/logo/base.png', account: false, style: { backgroundColor: "transparent !important" } }), _jsxs("div", { children: [_jsx(NSTable, { ref: table, columns: columns, rows: rows, getCell: getCell, getColumnAttributes: () => { return {}; }, getRowKey: row => row.id.toString() }), _jsx(NSTabBar, { tabs: tabs })] }), _jsx(NSFooter, { name: 'Footer', scope: 'Namira Software Corporation', logo: 'https://static.namirasoft.com/image/namirasoft/site/logo/base.png' })] }));
|
|
37
42
|
}
|
|
38
43
|
//# sourceMappingURL=App.js.map
|
package/dist/App.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":";AAAA,OAAO,WAAW,CAAC;AACnB,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":";AAAA,OAAO,WAAW,CAAC;AACnB,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,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,GAAG,EAAE,KAAK,EACV,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,mBAAmB,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,CAAA,CAAC,CAAC,EACxC,SAAS,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,GAClC,EACF,KAAC,QAAQ,IAAC,IAAI,EAAE,IAAI,GAAI,IACnB,EAEN,KAAC,QAAQ,IAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,6BAA6B,EAAC,IAAI,EAAC,mEAAmE,GAAG,IACrI,CACH,CAAC;AACH,CAAC"}
|
|
@@ -2,10 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import Styles from './NSCard.module.css';
|
|
3
3
|
import { NSLinkBlue } from './NSLinkBlue';
|
|
4
4
|
export function NSCard(props) {
|
|
5
|
-
var _a, _b
|
|
5
|
+
var _a, _b;
|
|
6
6
|
return (_jsxs("article", { id: props.id, className: `${Styles.ns_card} ${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: props.style, children: [_jsxs("div", { className: Styles.ns_card_detail_container, children: [_jsxs("div", { className: Styles.ns_card_title_img, style: {
|
|
7
7
|
alignItems: props.description ? "flex-start" : "center",
|
|
8
|
-
}, children: [_jsx("img", Object.assign({ className: Styles.ns_card_img }, props.image)),
|
|
8
|
+
}, children: [_jsx("img", Object.assign({ className: Styles.ns_card_img }, props.image)), props.headline &&
|
|
9
|
+
_jsxs("span", { className: Styles.ns_card_headline, style: { color: (_b = props.headline) === null || _b === void 0 ? void 0 : _b.color }, children: [" ", props.headline.text, " "] }), _jsx("h3", { className: Styles.ns_card_title, children: props.title })] }), props.description &&
|
|
9
10
|
_jsx("p", { className: Styles.ns_card_description, children: props.description })] }), props.link ?
|
|
10
11
|
props.link.title ?
|
|
11
12
|
_jsx("div", { className: Styles.ns_card_link_container, children: _jsx(NSLinkBlue, { title: props.link.title, href: props.link.href, target: props.link.target, style: { marginTop: "24px" } }) })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSCard.js","sourceRoot":"","sources":["../../src/components/NSCard.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,qBAAqB,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAiB1C,MAAM,UAAU,MAAM,CAAC,KAAmB;;IAEzC,OAAO,CACN,mBAAS,EAAE,EAAE,KAAK,CAAC,EAAE,EACpB,SAAS,EAAE,GAAG,MAAM,CAAC,OAAO,IAAI,MAAA,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAC5D,KAAK,EAAE,KAAK,CAAC,KAAK,aAElB,eAAK,SAAS,EAAE,MAAM,CAAC,wBAAwB,aAC9C,eAAK,SAAS,EAAE,MAAM,CAAC,iBAAiB,EACvC,KAAK,EAAE;4BACN,UAAU,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ;yBACvD,aAED,4BAAK,SAAS,EAAE,MAAM,CAAC,WAAW,IAAM,KAAK,CAAC,KAAK,EAAI,
|
|
1
|
+
{"version":3,"file":"NSCard.js","sourceRoot":"","sources":["../../src/components/NSCard.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,qBAAqB,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAiB1C,MAAM,UAAU,MAAM,CAAC,KAAmB;;IAEzC,OAAO,CACN,mBAAS,EAAE,EAAE,KAAK,CAAC,EAAE,EACpB,SAAS,EAAE,GAAG,MAAM,CAAC,OAAO,IAAI,MAAA,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAC5D,KAAK,EAAE,KAAK,CAAC,KAAK,aAElB,eAAK,SAAS,EAAE,MAA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@@ import { NSFooter } from './NSFooter';
|
|
|
5
5
|
import { NSNotification } from './NSNotification';
|
|
6
6
|
export function NSLayout(props) {
|
|
7
7
|
var _a;
|
|
8
|
-
return (_jsxs("div", { id: props.id, className: `${Styles.ns_container} ${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: props.style, children: [_jsx(NSHeader, { scope: props.scope, name: "Header", logo: props.logo }), props.notifications.map(props => _jsx(NSNotification, Object.assign({}, props))), _jsx("main", { className:
|
|
8
|
+
return (_jsxs("div", { id: props.id, className: `${Styles.ns_container} ${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: props.style, children: [_jsx(NSHeader, { scope: props.scope, name: "Header", logo: props.logo }), props.notifications.map(props => _jsx(NSNotification, Object.assign({}, props))), _jsx("main", { className: `d-flex flex-column text-white px-3 ${Styles.ns_layout_main}`, style: { background: props.background }, children: props.children }), _jsx(NSFooter, { scope: props.scope, name: "Footer", logo: props.logo })] }));
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=NSLayout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSLayout.js","sourceRoot":"","sources":["../../src/components/NSLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAE3C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,cAAc,EAAwB,MAAM,kBAAkB,CAAC;AAWxE,MAAM,UAAU,QAAQ,CAAC,KAAqB;;IAE7C,OAAO,CACN,eAAK,EAAE,EAAE,KAAK,CAAC,EAAE,EAChB,SAAS,EAAE,GAAG,MAAM,CAAC,YAAY,IAAI,MAAA,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EACjE,KAAK,EAAE,KAAK,CAAC,KAAK,aAClB,KAAC,QAAQ,IAAC,KAAK,EAAE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,CACP,CAAC;AACH,CAAC"}
|
|
@@ -4,4 +4,15 @@
|
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: column;
|
|
6
6
|
justify-content: center;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.ns_layout_main {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
color: #fff;
|
|
13
|
+
padding-left: 16px;
|
|
14
|
+
padding-right: 16px;
|
|
15
|
+
background-attachment: fixed;
|
|
16
|
+
background-repeat: no-repeat;
|
|
17
|
+
background-size: cover;
|
|
7
18
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
3
|
+
interface TabRow {
|
|
4
|
+
label: string;
|
|
5
|
+
content: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export interface NSTabBarProps extends IBaseComponentProps {
|
|
8
|
+
tabs: TabRow[];
|
|
9
|
+
}
|
|
10
|
+
export declare function NSTabBar(props: NSTabBarProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Styles from './NSTabBar.module.css';
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
export function NSTabBar(props) {
|
|
5
|
+
const [activeTab, setActiveTab] = useState(1);
|
|
6
|
+
const handleTabClick = (index) => {
|
|
7
|
+
setActiveTab(index);
|
|
8
|
+
};
|
|
9
|
+
return (_jsxs("div", { className: `container ${Styles.ns_tab_bar}`, children: [_jsx("ul", { children: props.tabs.map((tab, index) => (_jsx("li", { className: activeTab === index ? Styles.active : '', onClick: () => handleTabClick(index), children: tab.label }, index))) }), _jsx("div", { className: Styles.ns_tab_content, children: props.tabs[activeTab].content })] }));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=NSTabBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NSTabBar.js","sourceRoot":"","sources":["../../src/components/NSTabBar.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAE3C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAYjC,MAAM,UAAU,QAAQ,CAAC,KAAoB;IAEzC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAE9C,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,EAAE;QAErC,YAAY,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC,CAAC;IACF,OAAO,CACH,eAAK,SAAS,EAAE,aAAa,MAAM,CAAC,UAAU,EAAE,aAC5C,uBACK,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5B,aAEI,SAAS,EAAE,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAE,CAAC,CAAC,EAAE,EACpD,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,YAEnC,GAAG,CAAC,KAAK,IAJL,KAAK,CAKT,CACR,CAAC,GACD,EACL,cAAK,SAAS,EAAE,MAAM,CAAC,cAAc,YAChC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,GAC5B,IACJ,CACT,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.ns_tab_bar {
|
|
2
|
+
border-radius: 8px;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
background: #141B5C66;
|
|
5
|
+
padding: 16px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.ns_tab_bar ul {
|
|
9
|
+
list-style-type: none;
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
display: flex;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.ns_tab_bar li {
|
|
16
|
+
flex: 1;
|
|
17
|
+
text-align: center;
|
|
18
|
+
padding: 10px;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
border-right: 1px solid #ccc;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ns_tab_bar li:last-child {
|
|
24
|
+
border-right: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ns_tab_bar li.active {
|
|
28
|
+
background-color: #ccc;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ns_tab_content {
|
|
32
|
+
padding: 16px;
|
|
33
|
+
border-radius: 0 0 8px 8px;
|
|
34
|
+
background-color: #FFFFFF99;
|
|
35
|
+
}
|
package/dist/main.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export * from "./components/NSLinkGreen";
|
|
|
38
38
|
export * from "./components/NSLinkRed";
|
|
39
39
|
export * from "./components/NSPagination";
|
|
40
40
|
export * from "./components/NSTable";
|
|
41
|
+
export * from "./components/NSTabBar";
|
|
41
42
|
export * from "./components/NSTitle";
|
|
42
43
|
export * from "./pages/NSLoginPage";
|
|
43
44
|
export * from "./pages/NSNotFoundPage";
|
package/dist/main.js
CHANGED
|
@@ -38,6 +38,7 @@ export * from "./components/NSLinkGreen";
|
|
|
38
38
|
export * from "./components/NSLinkRed";
|
|
39
39
|
export * from "./components/NSPagination";
|
|
40
40
|
export * from "./components/NSTable";
|
|
41
|
+
export * from "./components/NSTabBar";
|
|
41
42
|
export * from "./components/NSTitle";
|
|
42
43
|
export * from "./pages/NSLoginPage";
|
|
43
44
|
export * from "./pages/NSNotFoundPage";
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;A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CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC"}
|
package/package.json
CHANGED
package/src/App.tsx
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import './App.css';
|
|
2
2
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
3
|
-
import { NSFooter, NSHeader, NSTable } from './main';
|
|
3
|
+
import { NSFooter, NSHeader, NSTable, NSTabBar } from './main';
|
|
4
4
|
import { useRef } from 'react';
|
|
5
5
|
|
|
6
6
|
export function App()
|
|
7
7
|
{
|
|
8
|
+
const tabs = [
|
|
9
|
+
{ label: 'Information', content: <p>Content for Tab 1</p> },
|
|
10
|
+
{ label: 'Price History', content: <p>Content for Tab 2</p> },
|
|
11
|
+
{ label: 'Price Estimator', content: <p>Content for Tab 3</p> }
|
|
12
|
+
];
|
|
8
13
|
let columns = {
|
|
9
14
|
"id": "ID",
|
|
10
15
|
"project": "Project",
|
|
@@ -62,7 +67,9 @@ export function App()
|
|
|
62
67
|
getColumnAttributes={() => { return {} }}
|
|
63
68
|
getRowKey={row => row.id.toString()}
|
|
64
69
|
/>
|
|
70
|
+
<NSTabBar tabs={tabs} />
|
|
65
71
|
</div>
|
|
72
|
+
|
|
66
73
|
<NSFooter name='Footer' scope='Namira Software Corporation' logo='https://static.namirasoft.com/image/namirasoft/site/logo/base.png' />
|
|
67
74
|
</>
|
|
68
75
|
);
|
|
@@ -30,7 +30,9 @@ export function NSCard(props: INSCardProps)
|
|
|
30
30
|
}}
|
|
31
31
|
>
|
|
32
32
|
<img className={Styles.ns_card_img} {...props.image} />
|
|
33
|
-
|
|
33
|
+
{props.headline &&
|
|
34
|
+
<span className={Styles.ns_card_headline} style={{ color: props.headline?.color }}> {props.headline.text} </span>
|
|
35
|
+
}
|
|
34
36
|
<h3 className={Styles.ns_card_title}>
|
|
35
37
|
{props.title}
|
|
36
38
|
</h3>
|
|
@@ -4,4 +4,15 @@
|
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: column;
|
|
6
6
|
justify-content: center;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.ns_layout_main {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
color: #fff;
|
|
13
|
+
padding-left: 16px;
|
|
14
|
+
padding-right: 16px;
|
|
15
|
+
background-attachment: fixed;
|
|
16
|
+
background-repeat: no-repeat;
|
|
17
|
+
background-size: cover;
|
|
7
18
|
}
|
|
@@ -22,7 +22,7 @@ export function NSLayout(props: INSLayoutProps)
|
|
|
22
22
|
style={props.style}>
|
|
23
23
|
<NSHeader scope={props.scope} name="Header" logo={props.logo} />
|
|
24
24
|
{props.notifications.map(props => <NSNotification {...props}></NSNotification>)}
|
|
25
|
-
<main className=
|
|
25
|
+
<main className={`d-flex flex-column text-white px-3 ${Styles.ns_layout_main}`} style={{ background: props.background }}>
|
|
26
26
|
{props.children}
|
|
27
27
|
</main>
|
|
28
28
|
<NSFooter scope={props.scope} name="Footer" logo={props.logo} />
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.ns_tab_bar {
|
|
2
|
+
border-radius: 8px;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
background: #141B5C66;
|
|
5
|
+
padding: 16px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.ns_tab_bar ul {
|
|
9
|
+
list-style-type: none;
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
display: flex;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.ns_tab_bar li {
|
|
16
|
+
flex: 1;
|
|
17
|
+
text-align: center;
|
|
18
|
+
padding: 10px;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
border-right: 1px solid #ccc;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ns_tab_bar li:last-child {
|
|
24
|
+
border-right: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ns_tab_bar li.active {
|
|
28
|
+
background-color: #ccc;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ns_tab_content {
|
|
32
|
+
padding: 16px;
|
|
33
|
+
border-radius: 0 0 8px 8px;
|
|
34
|
+
background-color: #FFFFFF99;
|
|
35
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import Styles from './NSTabBar.module.css';
|
|
2
|
+
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
|
|
5
|
+
interface TabRow
|
|
6
|
+
{
|
|
7
|
+
label: string;
|
|
8
|
+
content: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export interface NSTabBarProps extends IBaseComponentProps
|
|
11
|
+
{
|
|
12
|
+
tabs: TabRow[]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function NSTabBar(props: NSTabBarProps)
|
|
16
|
+
{
|
|
17
|
+
const [activeTab, setActiveTab] = useState(1);
|
|
18
|
+
|
|
19
|
+
const handleTabClick = (index: number) =>
|
|
20
|
+
{
|
|
21
|
+
setActiveTab(index);
|
|
22
|
+
};
|
|
23
|
+
return (
|
|
24
|
+
<div className={`container ${Styles.ns_tab_bar}`}>
|
|
25
|
+
<ul>
|
|
26
|
+
{props.tabs.map((tab, index) => (
|
|
27
|
+
<li
|
|
28
|
+
key={index}
|
|
29
|
+
className={activeTab === index ? Styles.active : ''}
|
|
30
|
+
onClick={() => handleTabClick(index)}
|
|
31
|
+
>
|
|
32
|
+
{tab.label}
|
|
33
|
+
</li>
|
|
34
|
+
))}
|
|
35
|
+
</ul>
|
|
36
|
+
<div className={Styles.ns_tab_content}>
|
|
37
|
+
{props.tabs[activeTab].content}
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
41
|
+
}
|
package/src/main.ts
CHANGED
|
@@ -38,6 +38,7 @@ export * from "./components/NSLinkGreen";
|
|
|
38
38
|
export * from "./components/NSLinkRed";
|
|
39
39
|
export * from "./components/NSPagination";
|
|
40
40
|
export * from "./components/NSTable";
|
|
41
|
+
export * from "./components/NSTabBar";
|
|
41
42
|
export * from "./components/NSTitle";
|
|
42
43
|
export * from "./pages/NSLoginPage";
|
|
43
44
|
export * from "./pages/NSNotFoundPage";
|