@campxdev/shared 1.3.0 → 1.3.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.3.0",
3
+ "version": "1.3.2",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -66,7 +66,8 @@ const RenderAnchor = ({ button, icon, handleClick, loading, anchor }) => {
66
66
  {button?.label}
67
67
  </StyledDropDownButton>
68
68
  )
69
- if (!button) {
69
+
70
+ if (!button && !anchor) {
70
71
  return (
71
72
  <StyledIconButton
72
73
  outlined={icon?.outlined ?? false}
@@ -114,6 +115,9 @@ const DropDownButton = ({
114
115
  anchorEl={anchorEl}
115
116
  open={open}
116
117
  onClose={handleClose}
118
+ PaperProps={{
119
+ elevation: 2,
120
+ }}
117
121
  MenuListProps={{ sx: { padding: 0 }, ...menuListProps }}
118
122
  anchorOrigin={{
119
123
  vertical: 'bottom',
@@ -2,12 +2,18 @@ import { Button, IconButton, MenuItem, styled } from '@mui/material'
2
2
 
3
3
  export const StyledIconButton = styled(IconButton, {
4
4
  shouldForwardProp: (prop) => prop !== 'outlined',
5
- })<{ outlined?: boolean }>(({ theme, outlined }) => ({
6
- ...(outlined && {
7
- border: `1px solid ${theme.palette.primary.main}`,
8
- borderRadius: '5px',
5
+ })<{ outlined?: boolean; size: 'small' | 'regular' }>(
6
+ ({ theme, outlined, size }) => ({
7
+ ...(outlined && {
8
+ border: `1px solid ${theme.palette.primary.main}`,
9
+ borderRadius: '5px',
10
+ ...(size === 'small' && {
11
+ height: '50px',
12
+ width: '50px',
13
+ }),
14
+ }),
9
15
  }),
10
- }))
16
+ )
11
17
 
12
18
  export const StyledMenuItem = styled(MenuItem)(({}) => ({
13
19
  display: 'flex',
@@ -19,7 +19,7 @@ type AuthResponse = {
19
19
  data: {
20
20
  user?: any
21
21
  roles?: any
22
- username?: any
22
+ fullName?: any
23
23
  permissions?: any
24
24
  assets?: {
25
25
  logo: string
@@ -172,6 +172,10 @@ const muiTheme = createTheme({
172
172
  },
173
173
  },
174
174
  MuiButtonBase: {
175
+ defaultProps: {
176
+ disableRipple: true,
177
+ disableTouchRipple: true,
178
+ },
175
179
  styleOverrides: {
176
180
  root: {
177
181
  fontFamily: SECONDARY_FONT,