feat(button): add accent prop and disable pointer events (#10618)

Added an accent prop to the StyledButtonWrapper for additional styling
capabilities. Also disabled pointer events on ButtonIcon to prevent
interference during loading states.
This commit is contained in:
Antoine Moreaux
2025-03-03 14:59:55 +01:00
committed by GitHub
parent d2ad23d1cf
commit 83899ff26b
2 changed files with 3 additions and 1 deletions

View File

@ -404,7 +404,6 @@ const StyledButtonWrapper = styled.div<
})()};
`}
height: 100%;
max-width: ${({ loading, theme }) =>
loading ? `calc(100% - ${theme.spacing(8)})` : 'none'};
position: relative;
@ -441,6 +440,7 @@ export const Button = ({
<StyledButtonWrapper
loading={loading}
variant={variant}
accent={accent}
inverted={inverted}
disabled={soon || disabled}
>

View File

@ -31,6 +31,8 @@ const StyledIconWrapper = styled.div<{ loading?: boolean }>`
transform: translateY(-50%);
width: ${({ loading }) => (loading ? 0 : '100%')};
pointer-events: none;
`;
const StyledLoader = styled.div<{ loading?: boolean }>`