Skip to content

The open alternative to Salesforce, designed for AI.

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

Antoine Moreaux83899ff26bf5
diff --git a/packages/twenty-ui/src/input/button/components/Button/Button.tsx b/packages/twenty-ui/src/input/button/components/Button/Button.tsx
index f107f0cd581..bdad2a48b29 100644
--- a/packages/twenty-ui/src/input/button/components/Button/Button.tsx
+++ b/packages/twenty-ui/src/input/button/components/Button/Button.tsx
@@ -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}
>
diff --git a/packages/twenty-ui/src/input/button/components/Button/internal/ButtonIcon.tsx b/packages/twenty-ui/src/input/button/components/Button/internal/ButtonIcon.tsx
index 41ae8fe4ee6..18b0f7ed450 100644
--- a/packages/twenty-ui/src/input/button/components/Button/internal/ButtonIcon.tsx
+++ b/packages/twenty-ui/src/input/button/components/Button/internal/ButtonIcon.tsx
@@ -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 }>`