tapquest-ui-yeulamvietnam 2.0.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/example/README.md +50 -0
- package/example/eslint.config.js +28 -0
- package/example/index.html +13 -0
- package/example/package.json +35 -0
- package/example/public/vite.svg +1 -0
- package/example/src/App.css +8 -0
- package/example/src/App.tsx +62 -0
- package/example/src/Card/index.tsx +15 -0
- package/example/src/Icons/CircleArrow.tsx +8 -0
- package/example/src/Icons/icon1.tsx +19 -0
- package/example/src/View/CoreComponentView/index.tsx +255 -0
- package/example/src/View/MapView/index.tsx +1325 -0
- package/example/src/View/MapView/map.html +14 -0
- package/example/src/assets/fonts/Kanit/Kanit-Black.ttf +0 -0
- package/example/src/assets/fonts/Kanit/Kanit-BlackItalic.ttf +0 -0
- package/example/src/assets/fonts/Kanit/Kanit-Bold.ttf +0 -0
- package/example/src/assets/fonts/Kanit/Kanit-BoldItalic.ttf +0 -0
- package/example/src/assets/fonts/Kanit/Kanit-ExtraBold.ttf +0 -0
- package/example/src/assets/fonts/Kanit/Kanit-ExtraBoldItalic.ttf +0 -0
- package/example/src/assets/fonts/Kanit/Kanit-ExtraLight.ttf +0 -0
- package/example/src/assets/fonts/Kanit/Kanit-ExtraLightItalic.ttf +0 -0
- package/example/src/assets/fonts/Kanit/Kanit-Italic.ttf +0 -0
- package/example/src/assets/fonts/Kanit/Kanit-Light.ttf +0 -0
- package/example/src/assets/fonts/Kanit/Kanit-LightItalic.ttf +0 -0
- package/example/src/assets/fonts/Kanit/Kanit-Medium.ttf +0 -0
- package/example/src/assets/fonts/Kanit/Kanit-MediumItalic.ttf +0 -0
- package/example/src/assets/fonts/Kanit/Kanit-Regular.ttf +0 -0
- package/example/src/assets/fonts/Kanit/Kanit-SemiBold.ttf +0 -0
- package/example/src/assets/fonts/Kanit/Kanit-SemiBoldItalic.ttf +0 -0
- package/example/src/assets/fonts/Kanit/Kanit-Thin.ttf +0 -0
- package/example/src/assets/fonts/Kanit/Kanit-ThinItalic.ttf +0 -0
- package/example/src/assets/fonts/Kanit/OFL.txt +93 -0
- package/example/src/assets/fonts/Roboto/Roboto-Black.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto-BlackItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto-Bold.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto-BoldItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto-ExtraBold.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto-ExtraBoldItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto-ExtraLight.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto-ExtraLightItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto-Italic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto-Light.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto-LightItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto-Medium.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto-Regular.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto-SemiBold.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto-SemiBoldItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto-Thin.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto-ThinItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_Condensed-Black.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_Condensed-BlackItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_Condensed-Bold.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_Condensed-BoldItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_Condensed-ExtraBold.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_Condensed-ExtraBoldItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_Condensed-ExtraLight.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_Condensed-ExtraLightItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_Condensed-Italic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_Condensed-Light.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_Condensed-LightItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_Condensed-Medium.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_Condensed-MediumItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_Condensed-Regular.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_Condensed-SemiBold.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_Condensed-SemiBoldItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_Condensed-Thin.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_Condensed-ThinItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_SemiCondensed-Black.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_SemiCondensed-BlackItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_SemiCondensed-Bold.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_SemiCondensed-BoldItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_SemiCondensed-ExtraBold.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_SemiCondensed-ExtraBoldItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_SemiCondensed-ExtraLight.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_SemiCondensed-ExtraLightItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_SemiCondensed-Italic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_SemiCondensed-Light.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_SemiCondensed-LightItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_SemiCondensed-Medium.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_SemiCondensed-MediumItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_SemiCondensed-Regular.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_SemiCondensed-SemiBold.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_SemiCondensed-SemiBoldItalic.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_SemiCondensed-Thin.ttf +0 -0
- package/example/src/assets/fonts/Roboto/Roboto_SemiCondensed-ThinItalic.ttf +0 -0
- package/example/src/assets/fonts/iCielBCLodestone/iCielBCLodestone.ttf +0 -0
- package/example/src/assets/react.svg +1 -0
- package/example/src/fonts.css +66 -0
- package/example/src/index.css +70 -0
- package/example/src/main.tsx +10 -0
- package/example/src/vite-env.d.ts +1 -0
- package/example/tsconfig.app.json +26 -0
- package/example/tsconfig.json +7 -0
- package/example/tsconfig.node.json +24 -0
- package/example/vite.config.ts +7 -0
- package/index.css +20 -0
- package/index.ts +42 -0
- package/package.json +44 -0
- package/src/components/AppbarPrimaryButton/index.tsx +56 -0
- package/src/components/Avatar.styled/index.tsx +8 -0
- package/src/components/Button.styled/index.tsx +154 -0
- package/src/components/Card.styled/index.tsx +26 -0
- package/src/components/Compound/Appbar/index.tsx +88 -0
- package/src/components/Compound/Header/index.tsx +40 -0
- package/src/components/Compound/InteractiveMap/MapSvg.tsx +608 -0
- package/src/components/Compound/LocationOverviewCard/index.tsx +186 -0
- package/src/components/Compound/MemoryCard/index.tsx +267 -0
- package/src/components/Compound/ProgressStep/index.tsx +54 -0
- package/src/components/Compound/SponsorByContainer/index.tsx +31 -0
- package/src/components/FormItem.styled/index.tsx +23 -0
- package/src/components/Icons/AppbarBg.tsx +22 -0
- package/src/components/Icons/ArrowCircle.tsx +8 -0
- package/src/components/Icons/ArrowDown.tsx +15 -0
- package/src/components/Icons/Camera.tsx +17 -0
- package/src/components/Icons/Check.tsx +7 -0
- package/src/components/Icons/ChevronLeft.tsx +7 -0
- package/src/components/Icons/ChevronRight.tsx +16 -0
- package/src/components/Icons/CircleAlert.tsx +9 -0
- package/src/components/Icons/CircleArrow.tsx +8 -0
- package/src/components/Icons/CircleCheck.tsx +7 -0
- package/src/components/Icons/CornerUpRight.tsx +7 -0
- package/src/components/Icons/Dart.tsx +7 -0
- package/src/components/Icons/Discover.tsx +16 -0
- package/src/components/Icons/Edit.tsx +16 -0
- package/src/components/Icons/Email.tsx +16 -0
- package/src/components/Icons/Exclaimation.tsx +7 -0
- package/src/components/Icons/Facebook.tsx +7 -0
- package/src/components/Icons/Gear.tsx +15 -0
- package/src/components/Icons/Gift.tsx +18 -0
- package/src/components/Icons/Globe.tsx +14 -0
- package/src/components/Icons/Home.tsx +7 -0
- package/src/components/Icons/Icon1.tsx +19 -0
- package/src/components/Icons/Icon1sm.tsx +19 -0
- package/src/components/Icons/Instagram.tsx +9 -0
- package/src/components/Icons/Link.tsx +16 -0
- package/src/components/Icons/LocationPin.tsx +10 -0
- package/src/components/Icons/Logout.tsx +15 -0
- package/src/components/Icons/MapMarker.tsx +8 -0
- package/src/components/Icons/Marker/MarkerRed.tsx +17 -0
- package/src/components/Icons/Menu.tsx +11 -0
- package/src/components/Icons/Mission.tsx +17 -0
- package/src/components/Icons/Moment.tsx +18 -0
- package/src/components/Icons/Phone.tsx +15 -0
- package/src/components/Icons/Pin.tsx +8 -0
- package/src/components/Icons/PinCircle.tsx +17 -0
- package/src/components/Icons/PinOutlined.tsx +7 -0
- package/src/components/Icons/Profile.tsx +15 -0
- package/src/components/Icons/ProfileGift.tsx +23 -0
- package/src/components/Icons/ProgressBar.tsx +20 -0
- package/src/components/Icons/ProgressBarInner.tsx +44 -0
- package/src/components/Icons/SealCheckIcon.tsx +18 -0
- package/src/components/Icons/Search.tsx +7 -0
- package/src/components/Icons/SendMessage.tsx +7 -0
- package/src/components/Icons/Share.tsx +14 -0
- package/src/components/Icons/ShareMemoryBadge.tsx +11 -0
- package/src/components/Icons/ShieldWarningIcon.tsx +18 -0
- package/src/components/Icons/Spinner.tsx +18 -0
- package/src/components/Icons/Step.tsx +7 -0
- package/src/components/Icons/StepChecked.tsx +8 -0
- package/src/components/Icons/StepLine.tsx +7 -0
- package/src/components/Icons/Telegram.tsx +7 -0
- package/src/components/Icons/Trash.tsx +7 -0
- package/src/components/Icons/User.tsx +15 -0
- package/src/components/Icons/XIcon.tsx +8 -0
- package/src/components/Icons/Zalo.tsx +23 -0
- package/src/components/Icons/index.tsx +66 -0
- package/src/components/Image.styled/index.tsx +35 -0
- package/src/components/Input.styled/index.tsx +34 -0
- package/src/components/InputPassword/index.tsx +34 -0
- package/src/components/InputSearch.styled/index.tsx +18 -0
- package/src/components/Loader.styled/index.tsx +26 -0
- package/src/components/Modal.styled/index.tsx +63 -0
- package/src/components/ProcessBar.styled/index.tsx +26 -0
- package/src/components/ProgressCircular.styled/index.tsx +61 -0
- package/src/components/SVGs/NoResult.tsx +62 -0
- package/src/components/SVGs/index.tsx +3 -0
- package/src/components/Select.styled/index.tsx +32 -0
- package/src/components/Tabs.styled/index.tsx +22 -0
- package/src/components/TextArea.styled/index.tsx +34 -0
- package/src/components/Typography.styled/index.tsx +419 -0
- package/src/helpers/index.ts +175 -0
- package/src/hooks/useHTMLToCanvas.tsx +115 -0
- package/src/hooks/useInteractiveMap.tsx +659 -0
- package/src/types/type.d.ts +9 -0
- package/tsconfig.json +33 -0
- package/tsconfig.node.json +12 -0
- package/tsup.config.ts +24 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { Button as ButtonAntd } from "antd";
|
|
2
|
+
import { BaseButtonProps } from "antd/es/button/button";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
|
|
5
|
+
interface ButtonProps extends Omit<BaseButtonProps, "size"> {
|
|
6
|
+
$textColor?: string;
|
|
7
|
+
$backgroundColor?: string;
|
|
8
|
+
$borderColor?: string;
|
|
9
|
+
$borderRadius?: string;
|
|
10
|
+
$disabledBackgroundColor?: string;
|
|
11
|
+
$fluid?: boolean;
|
|
12
|
+
$size?: "xs" | "small" | "middle" | "large";
|
|
13
|
+
$padding?: string;
|
|
14
|
+
$height?: string;
|
|
15
|
+
$width?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const getStyle = (size: "xs" | "small" | "middle" | "large", height?: string, width?: string) => {
|
|
19
|
+
|
|
20
|
+
if(height && width) {
|
|
21
|
+
return {
|
|
22
|
+
height: height,
|
|
23
|
+
width: width,
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
switch (size) {
|
|
28
|
+
case "xs":
|
|
29
|
+
return {
|
|
30
|
+
height: "32px",
|
|
31
|
+
fontSize: "14px",
|
|
32
|
+
fontFamily: "var(--font-kanit)",
|
|
33
|
+
borderRadius: "4px",
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
case "small":
|
|
37
|
+
return {
|
|
38
|
+
height: "40px",
|
|
39
|
+
fontSize: "16px",
|
|
40
|
+
fontFamily: "var(--font-kanit)",
|
|
41
|
+
fontWeight: "600",
|
|
42
|
+
borderRadius: "40px",
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
case "large":
|
|
46
|
+
return {
|
|
47
|
+
height: "56px",
|
|
48
|
+
fontSize: "20px",
|
|
49
|
+
fontFamily: "var(--font-kanit)",
|
|
50
|
+
fontWeight: "600",
|
|
51
|
+
borderRadius: "40px",
|
|
52
|
+
|
|
53
|
+
}
|
|
54
|
+
default:
|
|
55
|
+
case "middle":
|
|
56
|
+
return {
|
|
57
|
+
height: "44px",
|
|
58
|
+
fontSize: "16px",
|
|
59
|
+
fontFamily: "var(--font-kanit)",
|
|
60
|
+
fontWeight: "600",
|
|
61
|
+
borderRadius: "40px",
|
|
62
|
+
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const Button = styled(ButtonAntd) <ButtonProps>`
|
|
68
|
+
${({ $size: size, $height: height, $width: width }) => getStyle(size as "small" | "middle" | "large", height, width)}
|
|
69
|
+
|
|
70
|
+
${({ type }) => {
|
|
71
|
+
if (type === "text") {
|
|
72
|
+
return `
|
|
73
|
+
height: auto;
|
|
74
|
+
`
|
|
75
|
+
}
|
|
76
|
+
}}
|
|
77
|
+
|
|
78
|
+
&.ant-btn{
|
|
79
|
+
gap: 4px;
|
|
80
|
+
transition: width 0s;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
&&& {
|
|
85
|
+
background-color: ${({ $backgroundColor: backgroundColor }) => backgroundColor};
|
|
86
|
+
color: ${({ $textColor: textColor }) => textColor};
|
|
87
|
+
border-color: ${({ $borderColor: borderColor, $backgroundColor: backgroundColor }) => borderColor ?? backgroundColor};
|
|
88
|
+
border-radius: ${({ $borderRadius: borderRadius }) => borderRadius};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&&&:hover {
|
|
92
|
+
background-color: ${({ $backgroundColor: backgroundColor }) => backgroundColor ?? "inherit"};
|
|
93
|
+
border-color: ${({ $borderColor: borderColor, $backgroundColor: backgroundColor }) => borderColor ?? backgroundColor};
|
|
94
|
+
color: ${({ $textColor: textColor }) => textColor};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&&&:disabled {
|
|
98
|
+
background-color: ${({ $disabledBackgroundColor: disabledBackgroundColor }) => disabledBackgroundColor ?? "inherit"};
|
|
99
|
+
border-color: ${({ $disabledBackgroundColor: disabledBackgroundColor }) => disabledBackgroundColor ?? "inherit"};
|
|
100
|
+
color: ${({ $textColor: textColor }) => textColor};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.ant-btn-icon {
|
|
104
|
+
line-height: 1;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
text-transform: uppercase;
|
|
108
|
+
|
|
109
|
+
${({ type, $size: size, $fluid: fluid, $padding: padding }) => {
|
|
110
|
+
let styles = '';
|
|
111
|
+
|
|
112
|
+
if (padding) {
|
|
113
|
+
styles += `
|
|
114
|
+
padding: ${padding} !important;
|
|
115
|
+
`;
|
|
116
|
+
} else {
|
|
117
|
+
if (type === "text") {
|
|
118
|
+
styles += `
|
|
119
|
+
padding-left: 0px;
|
|
120
|
+
padding-right: 0px;
|
|
121
|
+
`;
|
|
122
|
+
} else if (size === "xs") {
|
|
123
|
+
styles += `
|
|
124
|
+
padding-left: 8px;
|
|
125
|
+
padding-right: 8px;
|
|
126
|
+
`;
|
|
127
|
+
} else if (size === "middle") {
|
|
128
|
+
styles += `
|
|
129
|
+
padding-left: 24px;
|
|
130
|
+
padding-right: 24px;
|
|
131
|
+
`;
|
|
132
|
+
} else if (size === "large") {
|
|
133
|
+
styles += `
|
|
134
|
+
padding-left: 32px;
|
|
135
|
+
padding-right: 32px;
|
|
136
|
+
`;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (fluid) {
|
|
141
|
+
styles += `
|
|
142
|
+
width: 100%;
|
|
143
|
+
`;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return styles;
|
|
147
|
+
}}
|
|
148
|
+
|
|
149
|
+
&&&.ant-btn-loading {
|
|
150
|
+
gap: 8px;
|
|
151
|
+
}
|
|
152
|
+
`;
|
|
153
|
+
|
|
154
|
+
export default Button;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
|
|
3
|
+
interface CardProps {
|
|
4
|
+
$backgroundColor?: string;
|
|
5
|
+
$padding?: string;
|
|
6
|
+
$borderRadius?: string;
|
|
7
|
+
$border?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const Card = styled.div<CardProps>`
|
|
11
|
+
|
|
12
|
+
${props => props.$backgroundColor && `
|
|
13
|
+
background-color: ${props.$backgroundColor};
|
|
14
|
+
`}
|
|
15
|
+
${props => props.$padding && `
|
|
16
|
+
padding: ${props.$padding};
|
|
17
|
+
`}
|
|
18
|
+
${props => props.$borderRadius && `
|
|
19
|
+
border-radius: ${props.$borderRadius};
|
|
20
|
+
`}
|
|
21
|
+
${props => props.$border && `
|
|
22
|
+
border: ${props.$border};
|
|
23
|
+
`}
|
|
24
|
+
`
|
|
25
|
+
|
|
26
|
+
export default Card;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { AppbarMenuItem } from "../../../types/type";
|
|
3
|
+
|
|
4
|
+
import { AppbarBg } from "../../Icons/AppbarBg";
|
|
5
|
+
|
|
6
|
+
import Typography from "../../Typography.styled"; ``
|
|
7
|
+
|
|
8
|
+
const AppbarWrapper = styled.div`
|
|
9
|
+
position: relative;
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 62px;
|
|
12
|
+
`
|
|
13
|
+
|
|
14
|
+
const AppbarBackgroundWrapper = styled.div`
|
|
15
|
+
position: absolute;
|
|
16
|
+
top: -21%;
|
|
17
|
+
left: 50%;
|
|
18
|
+
transform: translateX(-50%);
|
|
19
|
+
height: 62px;
|
|
20
|
+
`
|
|
21
|
+
|
|
22
|
+
const AppbarItemsListWrapper = styled.div`
|
|
23
|
+
position: relative;
|
|
24
|
+
padding: 0 15px 4px;
|
|
25
|
+
display: flex;
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 100%;
|
|
28
|
+
`
|
|
29
|
+
const AppbarItem = styled.div<{ $isActive: boolean, $disabled: boolean }>`
|
|
30
|
+
width: 100%;
|
|
31
|
+
position: relative;
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: flex-end;
|
|
36
|
+
gap: 4px;
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 100%;
|
|
39
|
+
${({ $isActive: isActive }) => isActive ? `
|
|
40
|
+
color: #A71A1A;
|
|
41
|
+
` : `
|
|
42
|
+
color: #8F8F8F;
|
|
43
|
+
`}
|
|
44
|
+
${({ $disabled: isDisabled }) => isDisabled ? `
|
|
45
|
+
opacity: 0.5;
|
|
46
|
+
` : `
|
|
47
|
+
opacity: 1;
|
|
48
|
+
`}
|
|
49
|
+
`
|
|
50
|
+
|
|
51
|
+
interface AppbarProps {
|
|
52
|
+
items: AppbarMenuItem[];
|
|
53
|
+
onMenuItemClick: (item: AppbarMenuItem) => void;
|
|
54
|
+
currentItem: AppbarMenuItem | null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const Appbar = ({
|
|
58
|
+
items,
|
|
59
|
+
onMenuItemClick,
|
|
60
|
+
currentItem
|
|
61
|
+
}: AppbarProps) => {
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<AppbarWrapper>
|
|
65
|
+
<AppbarBackgroundWrapper>
|
|
66
|
+
<AppbarBg />
|
|
67
|
+
</AppbarBackgroundWrapper>
|
|
68
|
+
<AppbarItemsListWrapper>
|
|
69
|
+
{items.map((item) => (
|
|
70
|
+
<AppbarItem
|
|
71
|
+
key={item.title}
|
|
72
|
+
$isActive={currentItem?.title === item.title}
|
|
73
|
+
onClick={() => {
|
|
74
|
+
onMenuItemClick?.(item)
|
|
75
|
+
// setActiveItem(item)
|
|
76
|
+
}}
|
|
77
|
+
$disabled={item?.disabled ?? false}
|
|
78
|
+
>
|
|
79
|
+
{item?.icon}
|
|
80
|
+
<Typography $type="body-text-2-semibold">{item.title}</Typography>
|
|
81
|
+
</AppbarItem>
|
|
82
|
+
))}
|
|
83
|
+
</AppbarItemsListWrapper>
|
|
84
|
+
</AppbarWrapper>
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export default Appbar;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import styled from "styled-components"
|
|
2
|
+
|
|
3
|
+
const HeaderWrapper = styled.div`
|
|
4
|
+
position: relative;
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
align-items: center;
|
|
8
|
+
height: 53px;
|
|
9
|
+
padding: 0 16px;
|
|
10
|
+
`
|
|
11
|
+
|
|
12
|
+
const MiddleWrapper = styled.div`
|
|
13
|
+
position: absolute;
|
|
14
|
+
left: 50%;
|
|
15
|
+
transform: translateX(-50%);
|
|
16
|
+
width: 100%;
|
|
17
|
+
max-width: calc(100vw - 32px - 64px - 16px);
|
|
18
|
+
`
|
|
19
|
+
|
|
20
|
+
interface HeaderProps {
|
|
21
|
+
left?: React.ReactNode;
|
|
22
|
+
middle?: React.ReactNode;
|
|
23
|
+
right?: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default function Header({ left, middle, right }: HeaderProps) {
|
|
27
|
+
return (
|
|
28
|
+
<HeaderWrapper>
|
|
29
|
+
{left}
|
|
30
|
+
{
|
|
31
|
+
middle && (
|
|
32
|
+
<MiddleWrapper>
|
|
33
|
+
{middle}
|
|
34
|
+
</MiddleWrapper>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
{right}
|
|
38
|
+
</HeaderWrapper>
|
|
39
|
+
)
|
|
40
|
+
}
|