react-frontend-common-components 0.0.76 → 0.0.79
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/index.d.ts +7 -5
- package/dist/index.js +13 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -28
- package/dist/index.mjs.map +1 -1
- package/package.json +40 -40
- package/rollup.config.js +44 -44
- package/src/components/app-avatar/app-avatar.tsx +24 -24
- package/src/components/app-back-arrow/app-back-arrow.css +17 -17
- package/src/components/app-back-arrow/app-back-arrow.tsx +37 -37
- package/src/components/app-badge/app-badge.css +11 -11
- package/src/components/app-badge/app-badge.tsx +44 -44
- package/src/components/app-bread-crumb/app-bread-crumb.tsx +16 -16
- package/src/components/app-button/app-button.css +13 -13
- package/src/components/app-button/app-button.tsx +51 -51
- package/src/components/app-card/app-card.css +8 -8
- package/src/components/app-card/app-card.tsx +43 -43
- package/src/components/app-carousel/app-carousel.css +68 -68
- package/src/components/app-carousel/app-carousel.tsx +62 -62
- package/src/components/app-chart/app-chart.css +6 -6
- package/src/components/app-chart/app-chart.tsx +98 -98
- package/src/components/app-checkbox-text/app-checkbox-text.css +12 -12
- package/src/components/app-checkbox-text/app-checkbox-text.tsx +32 -32
- package/src/components/app-collapse/app-collapse.tsx +57 -57
- package/src/components/app-custom-loader/app-custom-loader.css +116 -116
- package/src/components/app-custom-loader/app-custom-loader.tsx +23 -23
- package/src/components/app-divider/app-divider.tsx +16 -16
- package/src/components/app-float-button/app-float-button.tsx +23 -23
- package/src/components/app-image-box/app-image-box.css +22 -22
- package/src/components/app-image-box/app-image-box.tsx +42 -42
- package/src/components/app-input/app-input.css +59 -59
- package/src/components/app-input/app-input.tsx +93 -93
- package/src/components/app-label/app-label.css +5 -5
- package/src/components/app-label/app-label.tsx +34 -34
- package/src/components/app-list/app-list.tsx +26 -26
- package/src/components/app-loader/app-loader.css +16 -16
- package/src/components/app-loader/app-loader.tsx +28 -28
- package/src/components/app-location-map/app-location-map.css +4 -4
- package/src/components/app-location-map/app-location-map.tsx +62 -62
- package/src/components/app-modal/app-modal.css +34 -34
- package/src/components/app-modal/app-modal.tsx +61 -61
- package/src/components/app-otp-field/app-otp-field.css +28 -28
- package/src/components/app-otp-field/app-otp-field.tsx +70 -70
- package/src/components/app-pagination/app-pagination.tsx +40 -40
- package/src/components/app-password-input/app-password-input.css +41 -41
- package/src/components/app-password-input/app-password-input.tsx +90 -90
- package/src/components/app-phone-input/app-phone-input.css +12 -12
- package/src/components/app-phone-input/app-phone-input.tsx +56 -56
- package/src/components/app-popover/app-popover.css +5 -5
- package/src/components/app-popover/app-popover.tsx +45 -45
- package/src/components/app-progress/app-progress.tsx +40 -40
- package/src/components/app-radio-group/app-radio-group.css +6 -6
- package/src/components/app-radio-group/app-radio-group.tsx +45 -45
- package/src/components/app-select/app-select.css +33 -33
- package/src/components/app-select/app-select.tsx +90 -59
- package/src/components/app-select-add/app-select-add.css +21 -21
- package/src/components/app-select-add/app-select-add.tsx +34 -34
- package/src/components/app-sidebar/app-sidebar.css +49 -49
- package/src/components/app-sidebar/app-sidebar.tsx +87 -87
- package/src/components/app-tab/app-tab.css +22 -22
- package/src/components/app-tab/app-tab.tsx +31 -31
- package/src/components/app-table/app-table.tsx +42 -42
- package/src/components/app-tag/app-tag.css +11 -11
- package/src/components/app-tag/app-tag.tsx +48 -48
- package/src/components/app-textarea/app-textarea.css +25 -25
- package/src/components/app-textarea/app-textarea.tsx +59 -59
- package/src/components/app-title/app-title.css +12 -12
- package/src/components/app-title/app-title.tsx +28 -28
- package/src/components/app-toggle-button/app-toggle-button.css +27 -27
- package/src/components/app-toggle-button/app-toggle-button.tsx +43 -43
- package/src/components/app-upload-image/app-upload-image.css +26 -26
- package/src/components/app-upload-image/app-upload-image.tsx +90 -90
- package/src/components/over-view-card/over-view-card.css +15 -15
- package/src/components/over-view-card/over-view-card.tsx +26 -26
- package/src/index.ts +38 -38
- package/src/themes/icons/icons.tsx +146 -146
- package/src/themes/images/profile-img.svg +14 -14
- package/tsconfig.json +20 -20
@@ -1,59 +1,90 @@
|
|
1
|
-
import React from "react";
|
2
|
-
import { Select, SelectProps } from "antd";
|
3
|
-
import { MouseEventHandler } from "react";
|
4
|
-
import "./app-select.css";
|
5
|
-
|
6
|
-
interface
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
}
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
}
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
}
|
58
|
-
|
59
|
-
|
1
|
+
import React from "react";
|
2
|
+
import { Select, SelectProps } from "antd";
|
3
|
+
import { MouseEventHandler } from "react";
|
4
|
+
import "./app-select.css";
|
5
|
+
|
6
|
+
interface Options {
|
7
|
+
value: string;
|
8
|
+
label: string;
|
9
|
+
flag?: string;
|
10
|
+
}
|
11
|
+
|
12
|
+
interface AppSelectProps extends SelectProps {
|
13
|
+
className?: string;
|
14
|
+
value?: string | null;
|
15
|
+
dataTestId?: string;
|
16
|
+
id?: string;
|
17
|
+
disabled?: boolean;
|
18
|
+
handleChange?: (value: string | string[]) => void;
|
19
|
+
onClick?: MouseEventHandler<HTMLElement>;
|
20
|
+
options?: Options[];
|
21
|
+
onSelectChange?: (value: string) => void;
|
22
|
+
required?: boolean;
|
23
|
+
placeholder?: string;
|
24
|
+
errorMessage?: string;
|
25
|
+
showSearch?: boolean;
|
26
|
+
}
|
27
|
+
|
28
|
+
const AppSelect = ({
|
29
|
+
value,
|
30
|
+
handleChange,
|
31
|
+
options,
|
32
|
+
disabled,
|
33
|
+
placeholder,
|
34
|
+
className,
|
35
|
+
errorMessage,
|
36
|
+
showSearch,
|
37
|
+
required,
|
38
|
+
...props
|
39
|
+
}: AppSelectProps) => {
|
40
|
+
return (
|
41
|
+
<div className={`appselect ${className}`}>
|
42
|
+
<Select
|
43
|
+
className={"select"}
|
44
|
+
showSearch={showSearch}
|
45
|
+
disabled={disabled}
|
46
|
+
value={value?.length ? value : null}
|
47
|
+
placeholder={`${required ? placeholder + " (required)" : placeholder}`}
|
48
|
+
onChange={(value: string | string[]) =>
|
49
|
+
handleChange && handleChange(value)
|
50
|
+
}
|
51
|
+
filterOption={(input, options) =>
|
52
|
+
(options?.label || "")
|
53
|
+
.toString()
|
54
|
+
.toLowerCase()
|
55
|
+
.includes(input.toLowerCase())
|
56
|
+
}
|
57
|
+
options={options?.map(({ value, label, flag }) => ({
|
58
|
+
label: (
|
59
|
+
<>
|
60
|
+
{flag ? (
|
61
|
+
<div
|
62
|
+
style={{
|
63
|
+
display: "grid",
|
64
|
+
alignItems: "center",
|
65
|
+
gridTemplateColumns: "0.2fr 1fr",
|
66
|
+
gap: 12,
|
67
|
+
}}
|
68
|
+
>
|
69
|
+
<img
|
70
|
+
src={flag}
|
71
|
+
alt={label}
|
72
|
+
style={{ width: 32, height: 20 }}
|
73
|
+
/>
|
74
|
+
<span>{label}</span>
|
75
|
+
</div>
|
76
|
+
) : (
|
77
|
+
<span>{label}</span>
|
78
|
+
)}
|
79
|
+
</>
|
80
|
+
),
|
81
|
+
value,
|
82
|
+
}))}
|
83
|
+
{...props}
|
84
|
+
></Select>
|
85
|
+
{errorMessage && <div className={"error"}>{errorMessage}</div>}
|
86
|
+
</div>
|
87
|
+
);
|
88
|
+
};
|
89
|
+
|
90
|
+
export default AppSelect;
|
@@ -1,21 +1,21 @@
|
|
1
|
-
.appSelectAdd {
|
2
|
-
*:focus,
|
3
|
-
*:active,
|
4
|
-
*:focus-within {
|
5
|
-
outline: 0 !important;
|
6
|
-
box-shadow: unset !important;
|
7
|
-
}
|
8
|
-
.ant-select {
|
9
|
-
&:hover {
|
10
|
-
.ant-select-selector {
|
11
|
-
border-color: #d9d9d9 !important;
|
12
|
-
}
|
13
|
-
}
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
|
-
.error {
|
18
|
-
color: red;
|
19
|
-
font-size: 0.875rem;
|
20
|
-
margin-top: 0.25rem;
|
21
|
-
}
|
1
|
+
.appSelectAdd {
|
2
|
+
*:focus,
|
3
|
+
*:active,
|
4
|
+
*:focus-within {
|
5
|
+
outline: 0 !important;
|
6
|
+
box-shadow: unset !important;
|
7
|
+
}
|
8
|
+
.ant-select {
|
9
|
+
&:hover {
|
10
|
+
.ant-select-selector {
|
11
|
+
border-color: #d9d9d9 !important;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
.error {
|
18
|
+
color: red;
|
19
|
+
font-size: 0.875rem;
|
20
|
+
margin-top: 0.25rem;
|
21
|
+
}
|
@@ -1,34 +1,34 @@
|
|
1
|
-
import React from "react";
|
2
|
-
import { Select } from "antd";
|
3
|
-
import type { SelectProps } from "antd";
|
4
|
-
import "./app-select-add.css";
|
5
|
-
|
6
|
-
interface AppSelectAddProps extends SelectProps {
|
7
|
-
options?: SelectProps["options"];
|
8
|
-
placeholder?: string;
|
9
|
-
onChange?: (value: string) => void;
|
10
|
-
className?: string;
|
11
|
-
}
|
12
|
-
|
13
|
-
const AppSelectAdd = ({
|
14
|
-
options = [],
|
15
|
-
placeholder = "Tags Mode",
|
16
|
-
onChange,
|
17
|
-
className,
|
18
|
-
...rest
|
19
|
-
}: AppSelectAddProps) => {
|
20
|
-
return (
|
21
|
-
<div className={`appSelectAdd ${className}`}>
|
22
|
-
<Select
|
23
|
-
mode="tags"
|
24
|
-
style={{ width: "100%" }}
|
25
|
-
placeholder={placeholder}
|
26
|
-
onChange={onChange}
|
27
|
-
options={options}
|
28
|
-
{...rest}
|
29
|
-
/>
|
30
|
-
</div>
|
31
|
-
);
|
32
|
-
};
|
33
|
-
|
34
|
-
export default AppSelectAdd;
|
1
|
+
import React from "react";
|
2
|
+
import { Select } from "antd";
|
3
|
+
import type { SelectProps } from "antd";
|
4
|
+
import "./app-select-add.css";
|
5
|
+
|
6
|
+
interface AppSelectAddProps extends SelectProps {
|
7
|
+
options?: SelectProps["options"];
|
8
|
+
placeholder?: string;
|
9
|
+
onChange?: (value: string) => void;
|
10
|
+
className?: string;
|
11
|
+
}
|
12
|
+
|
13
|
+
const AppSelectAdd = ({
|
14
|
+
options = [],
|
15
|
+
placeholder = "Tags Mode",
|
16
|
+
onChange,
|
17
|
+
className,
|
18
|
+
...rest
|
19
|
+
}: AppSelectAddProps) => {
|
20
|
+
return (
|
21
|
+
<div className={`appSelectAdd ${className}`}>
|
22
|
+
<Select
|
23
|
+
mode="tags"
|
24
|
+
style={{ width: "100%" }}
|
25
|
+
placeholder={placeholder}
|
26
|
+
onChange={onChange}
|
27
|
+
options={options}
|
28
|
+
{...rest}
|
29
|
+
/>
|
30
|
+
</div>
|
31
|
+
);
|
32
|
+
};
|
33
|
+
|
34
|
+
export default AppSelectAdd;
|
@@ -1,49 +1,49 @@
|
|
1
|
-
.sideBar {
|
2
|
-
height: 100vh;
|
3
|
-
width: max-content;
|
4
|
-
.sider {
|
5
|
-
height: 100%;
|
6
|
-
.ant-layout-sider-children {
|
7
|
-
height: 100%;
|
8
|
-
display: flex;
|
9
|
-
flex-direction: column;
|
10
|
-
row-gap: 2.875rem;
|
11
|
-
.ant-menu {
|
12
|
-
border: none;
|
13
|
-
&::after {
|
14
|
-
display: none;
|
15
|
-
}
|
16
|
-
&::before {
|
17
|
-
display: none;
|
18
|
-
}
|
19
|
-
}
|
20
|
-
}
|
21
|
-
}
|
22
|
-
}
|
23
|
-
|
24
|
-
.sideBarHead {
|
25
|
-
padding: 16px;
|
26
|
-
}
|
27
|
-
|
28
|
-
.menu {
|
29
|
-
border-right: 0;
|
30
|
-
}
|
31
|
-
|
32
|
-
.footer {
|
33
|
-
position: relative;
|
34
|
-
&::before {
|
35
|
-
content: "";
|
36
|
-
height: 1px;
|
37
|
-
width: 80%;
|
38
|
-
position: absolute;
|
39
|
-
top: 0;
|
40
|
-
right: 50%;
|
41
|
-
left: 50%;
|
42
|
-
transform: translateX(-50%);
|
43
|
-
background-color: #acacac;
|
44
|
-
}
|
45
|
-
}
|
46
|
-
|
47
|
-
.tag {
|
48
|
-
margin-left: 8px;
|
49
|
-
}
|
1
|
+
.sideBar {
|
2
|
+
height: 100vh;
|
3
|
+
width: max-content;
|
4
|
+
.sider {
|
5
|
+
height: 100%;
|
6
|
+
.ant-layout-sider-children {
|
7
|
+
height: 100%;
|
8
|
+
display: flex;
|
9
|
+
flex-direction: column;
|
10
|
+
row-gap: 2.875rem;
|
11
|
+
.ant-menu {
|
12
|
+
border: none;
|
13
|
+
&::after {
|
14
|
+
display: none;
|
15
|
+
}
|
16
|
+
&::before {
|
17
|
+
display: none;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
.sideBarHead {
|
25
|
+
padding: 16px;
|
26
|
+
}
|
27
|
+
|
28
|
+
.menu {
|
29
|
+
border-right: 0;
|
30
|
+
}
|
31
|
+
|
32
|
+
.footer {
|
33
|
+
position: relative;
|
34
|
+
&::before {
|
35
|
+
content: "";
|
36
|
+
height: 1px;
|
37
|
+
width: 80%;
|
38
|
+
position: absolute;
|
39
|
+
top: 0;
|
40
|
+
right: 50%;
|
41
|
+
left: 50%;
|
42
|
+
transform: translateX(-50%);
|
43
|
+
background-color: #acacac;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
.tag {
|
48
|
+
margin-left: 8px;
|
49
|
+
}
|
@@ -1,87 +1,87 @@
|
|
1
|
-
import React from "react";
|
2
|
-
import { Layout, Menu } from "antd";
|
3
|
-
import "./app-sidebar.css";
|
4
|
-
|
5
|
-
const { Sider } = Layout;
|
6
|
-
|
7
|
-
interface SidebarProps {
|
8
|
-
links: {
|
9
|
-
onClick?: () => void;
|
10
|
-
label: string;
|
11
|
-
path: string;
|
12
|
-
icon: React.ReactNode;
|
13
|
-
activeIcon?: React.ReactNode;
|
14
|
-
tag?: React.ReactNode;
|
15
|
-
}[];
|
16
|
-
sideBarHead?: React.ReactNode;
|
17
|
-
footerLinks?: {
|
18
|
-
label: string;
|
19
|
-
path: string;
|
20
|
-
icon: React.ReactNode;
|
21
|
-
activeIcon?: React.ReactNode;
|
22
|
-
}[];
|
23
|
-
className?: string;
|
24
|
-
activeLink?: string;
|
25
|
-
}
|
26
|
-
|
27
|
-
const Sidebar = ({
|
28
|
-
links,
|
29
|
-
sideBarHead,
|
30
|
-
footerLinks,
|
31
|
-
className,
|
32
|
-
activeLink,
|
33
|
-
}: SidebarProps) => {
|
34
|
-
const handleNavigation = (path: string) => {
|
35
|
-
if (path) {
|
36
|
-
window.location.href = path;
|
37
|
-
}
|
38
|
-
};
|
39
|
-
|
40
|
-
const handleClick = (path: string, onClick?: () => void) => {
|
41
|
-
if (onClick) {
|
42
|
-
onClick();
|
43
|
-
} else {
|
44
|
-
handleNavigation(path);
|
45
|
-
}
|
46
|
-
};
|
47
|
-
|
48
|
-
const menuItems = links.map((link) => ({
|
49
|
-
key: link.path || link.label,
|
50
|
-
|
51
|
-
icon:
|
52
|
-
link.path === activeLink && link.activeIcon ? link.activeIcon : link.icon,
|
53
|
-
className: link.path === activeLink ? "active" : "",
|
54
|
-
label: (
|
55
|
-
<span onClick={() => handleClick(link.path, link.onClick)}>
|
56
|
-
{link.label}
|
57
|
-
{link.tag && <span className={"tag"}>{link.tag}</span>}
|
58
|
-
</span>
|
59
|
-
),
|
60
|
-
}));
|
61
|
-
|
62
|
-
const footerMenuItems = footerLinks?.map((link) => ({
|
63
|
-
key: link.path,
|
64
|
-
icon:
|
65
|
-
link.path === activeLink && link.activeIcon ? link.activeIcon : link.icon,
|
66
|
-
className: link.path === activeLink ? "active" : "",
|
67
|
-
label: (
|
68
|
-
<span onClick={() => handleNavigation(link.path)}>{link.label}</span>
|
69
|
-
),
|
70
|
-
}));
|
71
|
-
|
72
|
-
return (
|
73
|
-
<div className={`sideBar ${className}`}>
|
74
|
-
<Sider className={"sider"}>
|
75
|
-
<div className={"sideBarHead"}>{sideBarHead}</div>
|
76
|
-
<Menu mode="inline" className={"menu"} items={menuItems} />
|
77
|
-
{footerLinks && (
|
78
|
-
<div className={"footer"}>
|
79
|
-
<Menu mode="inline" items={footerMenuItems} />
|
80
|
-
</div>
|
81
|
-
)}
|
82
|
-
</Sider>
|
83
|
-
</div>
|
84
|
-
);
|
85
|
-
};
|
86
|
-
|
87
|
-
export default Sidebar;
|
1
|
+
import React from "react";
|
2
|
+
import { Layout, Menu } from "antd";
|
3
|
+
import "./app-sidebar.css";
|
4
|
+
|
5
|
+
const { Sider } = Layout;
|
6
|
+
|
7
|
+
interface SidebarProps {
|
8
|
+
links: {
|
9
|
+
onClick?: () => void;
|
10
|
+
label: string;
|
11
|
+
path: string;
|
12
|
+
icon: React.ReactNode;
|
13
|
+
activeIcon?: React.ReactNode;
|
14
|
+
tag?: React.ReactNode;
|
15
|
+
}[];
|
16
|
+
sideBarHead?: React.ReactNode;
|
17
|
+
footerLinks?: {
|
18
|
+
label: string;
|
19
|
+
path: string;
|
20
|
+
icon: React.ReactNode;
|
21
|
+
activeIcon?: React.ReactNode;
|
22
|
+
}[];
|
23
|
+
className?: string;
|
24
|
+
activeLink?: string;
|
25
|
+
}
|
26
|
+
|
27
|
+
const Sidebar = ({
|
28
|
+
links,
|
29
|
+
sideBarHead,
|
30
|
+
footerLinks,
|
31
|
+
className,
|
32
|
+
activeLink,
|
33
|
+
}: SidebarProps) => {
|
34
|
+
const handleNavigation = (path: string) => {
|
35
|
+
if (path) {
|
36
|
+
window.location.href = path;
|
37
|
+
}
|
38
|
+
};
|
39
|
+
|
40
|
+
const handleClick = (path: string, onClick?: () => void) => {
|
41
|
+
if (onClick) {
|
42
|
+
onClick();
|
43
|
+
} else {
|
44
|
+
handleNavigation(path);
|
45
|
+
}
|
46
|
+
};
|
47
|
+
|
48
|
+
const menuItems = links.map((link) => ({
|
49
|
+
key: link.path || link.label,
|
50
|
+
|
51
|
+
icon:
|
52
|
+
link.path === activeLink && link.activeIcon ? link.activeIcon : link.icon,
|
53
|
+
className: link.path === activeLink ? "active" : "",
|
54
|
+
label: (
|
55
|
+
<span onClick={() => handleClick(link.path, link.onClick)}>
|
56
|
+
{link.label}
|
57
|
+
{link.tag && <span className={"tag"}>{link.tag}</span>}
|
58
|
+
</span>
|
59
|
+
),
|
60
|
+
}));
|
61
|
+
|
62
|
+
const footerMenuItems = footerLinks?.map((link) => ({
|
63
|
+
key: link.path,
|
64
|
+
icon:
|
65
|
+
link.path === activeLink && link.activeIcon ? link.activeIcon : link.icon,
|
66
|
+
className: link.path === activeLink ? "active" : "",
|
67
|
+
label: (
|
68
|
+
<span onClick={() => handleNavigation(link.path)}>{link.label}</span>
|
69
|
+
),
|
70
|
+
}));
|
71
|
+
|
72
|
+
return (
|
73
|
+
<div className={`sideBar ${className}`}>
|
74
|
+
<Sider className={"sider"}>
|
75
|
+
<div className={"sideBarHead"}>{sideBarHead}</div>
|
76
|
+
<Menu mode="inline" className={"menu"} items={menuItems} />
|
77
|
+
{footerLinks && (
|
78
|
+
<div className={"footer"}>
|
79
|
+
<Menu mode="inline" items={footerMenuItems} />
|
80
|
+
</div>
|
81
|
+
)}
|
82
|
+
</Sider>
|
83
|
+
</div>
|
84
|
+
);
|
85
|
+
};
|
86
|
+
|
87
|
+
export default Sidebar;
|
@@ -1,22 +1,22 @@
|
|
1
|
-
.appTab {
|
2
|
-
.tab {
|
3
|
-
.ant-tabs-nav {
|
4
|
-
&::before {
|
5
|
-
border: unset !important;
|
6
|
-
}
|
7
|
-
.ant-tabs-nav-wrap {
|
8
|
-
.ant-tabs-nav-list {
|
9
|
-
display: flex;
|
10
|
-
gap: 3.5rem;
|
11
|
-
align-items: center;
|
12
|
-
.ant-tabs-tab {
|
13
|
-
margin: 0;
|
14
|
-
}
|
15
|
-
.ant-tabs-ink-bar {
|
16
|
-
display: none;
|
17
|
-
}
|
18
|
-
}
|
19
|
-
}
|
20
|
-
}
|
21
|
-
}
|
22
|
-
}
|
1
|
+
.appTab {
|
2
|
+
.tab {
|
3
|
+
.ant-tabs-nav {
|
4
|
+
&::before {
|
5
|
+
border: unset !important;
|
6
|
+
}
|
7
|
+
.ant-tabs-nav-wrap {
|
8
|
+
.ant-tabs-nav-list {
|
9
|
+
display: flex;
|
10
|
+
gap: 3.5rem;
|
11
|
+
align-items: center;
|
12
|
+
.ant-tabs-tab {
|
13
|
+
margin: 0;
|
14
|
+
}
|
15
|
+
.ant-tabs-ink-bar {
|
16
|
+
display: none;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
@@ -1,31 +1,31 @@
|
|
1
|
-
import React from "react";
|
2
|
-
import { Tabs } from "antd";
|
3
|
-
import type { TabsProps } from "antd";
|
4
|
-
import "./app-tab.css";
|
5
|
-
|
6
|
-
interface AppTabProps {
|
7
|
-
className?: string;
|
8
|
-
items?: TabsProps["items"];
|
9
|
-
handleChange?: (activeKey: string) => void;
|
10
|
-
defaultActiveKey?: string;
|
11
|
-
}
|
12
|
-
|
13
|
-
const AppTab = ({
|
14
|
-
className,
|
15
|
-
items,
|
16
|
-
handleChange,
|
17
|
-
defaultActiveKey,
|
18
|
-
}: AppTabProps) => {
|
19
|
-
return (
|
20
|
-
<div className={`appTab ${className}`}>
|
21
|
-
<Tabs
|
22
|
-
defaultActiveKey={defaultActiveKey}
|
23
|
-
items={items}
|
24
|
-
onChange={handleChange}
|
25
|
-
className={"tab"}
|
26
|
-
/>
|
27
|
-
</div>
|
28
|
-
);
|
29
|
-
};
|
30
|
-
|
31
|
-
export default AppTab;
|
1
|
+
import React from "react";
|
2
|
+
import { Tabs } from "antd";
|
3
|
+
import type { TabsProps } from "antd";
|
4
|
+
import "./app-tab.css";
|
5
|
+
|
6
|
+
interface AppTabProps {
|
7
|
+
className?: string;
|
8
|
+
items?: TabsProps["items"];
|
9
|
+
handleChange?: (activeKey: string) => void;
|
10
|
+
defaultActiveKey?: string;
|
11
|
+
}
|
12
|
+
|
13
|
+
const AppTab = ({
|
14
|
+
className,
|
15
|
+
items,
|
16
|
+
handleChange,
|
17
|
+
defaultActiveKey,
|
18
|
+
}: AppTabProps) => {
|
19
|
+
return (
|
20
|
+
<div className={`appTab ${className}`}>
|
21
|
+
<Tabs
|
22
|
+
defaultActiveKey={defaultActiveKey}
|
23
|
+
items={items}
|
24
|
+
onChange={handleChange}
|
25
|
+
className={"tab"}
|
26
|
+
/>
|
27
|
+
</div>
|
28
|
+
);
|
29
|
+
};
|
30
|
+
|
31
|
+
export default AppTab;
|