@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/shared",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -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)<{ size: 'small' | 'medium' }>(
13
- ({ theme, size }) => ({
14
- borderBottom: theme.borders.grayLight,
15
- minHeight: size === 'small' ? '48px' : '60px',
16
- display: 'flex',
17
- width: '100%',
18
- gap: '5px',
19
- gapY: '20px',
20
- alignItems: 'end',
21
- paddingLeft: '20px',
22
- flexWrap: 'wrap',
23
- '& a': {
24
- display: 'block',
25
- textDecoration: 'none',
26
- fontSize: size === 'small' ? '14px' : '15px',
27
- fontWeight: 600,
28
- color: theme.palette.secondary.main,
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 }) => (