Skip to content

Commit

Permalink
Merge pull request #566 from msupply-foundation/565-entity-update-but…
Browse files Browse the repository at this point in the history
…ton-click

fix entity update button clickability
  • Loading branch information
lache-melvin authored Feb 1, 2024
2 parents a416563 + 12d220d commit 59b6051
Showing 1 changed file with 21 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { ButtonProps, Tooltip } from '@mui/material';
import { Box, ButtonProps, Tooltip } from '@mui/material';
import { ShrinkableBaseButton } from './ShrinkableBaseButton';
import { useIsScreen } from '@common/hooks';

Expand Down Expand Up @@ -41,23 +41,25 @@ export const ButtonWithIcon: React.FC<ButtonWithIconProps> = ({
const text = shrink ? null : label;

return (
<Tooltip title={title}>
<span>
<ShrinkableBaseButton
disabled={disabled}
shrink={shrink}
onClick={onClick}
variant={variant}
color={color}
size="small"
startIcon={startIcon}
aria-label={label}
{...buttonProps}
>
{centeredIcon}
{text}
</ShrinkableBaseButton>
</span>
</Tooltip>
<span>
<ShrinkableBaseButton
disabled={disabled}
shrink={shrink}
onClick={onClick}
variant={variant}
color={color}
size="small"
startIcon={startIcon}
aria-label={label}
{...buttonProps}
>
<Tooltip title={title}>
<Box>
{centeredIcon}
{text}
</Box>
</Tooltip>
</ShrinkableBaseButton>
</span>
);
};

0 comments on commit 59b6051

Please sign in to comment.