@tap-payments/os-micro-frontend-shared 0.0.174 → 0.0.176

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.
@@ -4,6 +4,7 @@ export interface StyledButtonProps extends BoxProps {
4
4
  title?: string;
5
5
  isActive?: boolean;
6
6
  isDisabled?: boolean;
7
+ hasImageFilter?: boolean;
7
8
  }
8
9
  declare function StyledButton({ children, title, ...props }: StyledButtonProps): import("react/jsx-runtime").JSX.Element;
9
10
  declare const _default: import("react").MemoExoticComponent<typeof StyledButton>;
@@ -2,4 +2,4 @@
2
2
  import { StyledButtonProps } from './StyledButton';
3
3
  export declare const Button: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
4
4
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
5
- }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Pick<StyledButtonProps, "isDisabled" | "isActive">, {}, {}>;
5
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Pick<StyledButtonProps, "isDisabled" | "isActive" | "hasImageFilter">, {}, {}>;
@@ -1,11 +1,13 @@
1
1
  import Box from '@mui/material/Box';
2
2
  import { styled } from '@mui/material/styles';
3
- export const Button = styled(Box)(({ isActive, isDisabled, theme }) => (Object.assign(Object.assign(Object.assign({ minWidth: 32, height: 32, width: 'fit-content', borderRadius: '4px', padding: '9px 8px', display: 'flex', alignItems: 'center', justifyContent: 'center', border: `1px solid ${theme.palette.divider}`, cursor: 'pointer' }, (isActive && {
3
+ export const Button = styled(Box)(({ isActive, isDisabled, hasImageFilter = true, theme }) => (Object.assign(Object.assign(Object.assign({ minWidth: 32, height: 32, width: 'fit-content', borderRadius: '4px', padding: '9px 8px', display: 'flex', alignItems: 'center', justifyContent: 'center', border: `1px solid ${theme.palette.divider}`, cursor: 'pointer' }, (isActive && {
4
4
  boxShadow: theme.shadows[7],
5
5
  borderColor: theme.palette.info.dark,
6
6
  })), (isDisabled && {
7
7
  opacity: 0.5,
8
8
  pointerEvents: 'none',
9
- })), { img: {
9
+ })), (hasImageFilter && {
10
+ img: {
10
11
  filter: 'brightness(0) invert(0)',
11
- } })));
12
+ },
13
+ }))));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tap-payments/os-micro-frontend-shared",
3
3
  "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.0.174",
4
+ "version": "0.0.176",
5
5
  "type": "module",
6
6
  "main": "build/index.js",
7
7
  "module": "build/index.js",