@campxdev/shared 1.5.1 → 1.5.2
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/package.json
CHANGED
|
@@ -7,28 +7,31 @@ interface TabsContainerProps {
|
|
|
7
7
|
path: string
|
|
8
8
|
}[]
|
|
9
9
|
size?: 'small' | 'medium'
|
|
10
|
+
center?: boolean
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
export const StyledTabsWrapper = styled(Box)<{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
13
|
+
export const StyledTabsWrapper = styled(Box)<{
|
|
14
|
+
size: 'small' | 'medium'
|
|
15
|
+
center
|
|
16
|
+
}>(({ theme, size, center }) => ({
|
|
17
|
+
justifyContent: center ? 'center' : 'flex-start',
|
|
18
|
+
borderBottom: theme.borders.grayLight,
|
|
19
|
+
minHeight: size === 'small' ? '48px' : '60px',
|
|
20
|
+
display: 'flex',
|
|
21
|
+
width: '100%',
|
|
22
|
+
gap: '5px',
|
|
23
|
+
gapY: '20px',
|
|
24
|
+
alignItems: 'end',
|
|
25
|
+
paddingLeft: '20px',
|
|
26
|
+
flexWrap: 'wrap',
|
|
27
|
+
'& a': {
|
|
28
|
+
display: 'block',
|
|
29
|
+
textDecoration: 'none',
|
|
30
|
+
fontSize: size === 'small' ? '14px' : '15px',
|
|
31
|
+
fontWeight: 600,
|
|
32
|
+
color: theme.palette.secondary.main,
|
|
33
|
+
},
|
|
34
|
+
}))
|
|
32
35
|
|
|
33
36
|
const StyledTab = styled(
|
|
34
37
|
(props: BoxProps) => (
|
|
@@ -61,9 +64,10 @@ const StyledTab = styled(
|
|
|
61
64
|
export default function NavigationTabs({
|
|
62
65
|
tabs,
|
|
63
66
|
size = 'medium',
|
|
67
|
+
center = false,
|
|
64
68
|
}: TabsContainerProps) {
|
|
65
69
|
return (
|
|
66
|
-
<StyledTabsWrapper size={size}>
|
|
70
|
+
<StyledTabsWrapper size={size} center={center}>
|
|
67
71
|
{tabs?.map((item, index) => (
|
|
68
72
|
<NavLink key={index} to={item?.path}>
|
|
69
73
|
{({ isActive }) => (
|