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:
@ -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}
|
||||
>
|
||||
|
||||
@ -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 }>`
|
||||
|
||||
Reference in New Issue
Block a user