@campxdev/shared 1.3.1 → 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.1",
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}
@@ -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',
@@ -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,