Skip to content

The open alternative to Salesforce, designed for AI.

Restore onboarding button contrast (#28662)

Raphaël Bosi316e4574a7e3
diff --git a/packages/twenty-ui/src/components/input/MainButton/MainButton.module.scss b/packages/twenty-ui/src/components/input/MainButton/MainButton.module.scss
index 130d0c12c25..d2aa66d10f2 100644
--- a/packages/twenty-ui/src/components/input/MainButton/MainButton.module.scss
+++ b/packages/twenty-ui/src/components/input/MainButton/MainButton.module.scss
@@ -1,4 +1,9 @@
.button {
--tw-button-font-weight: var(--t-font-weight-semi-bold);
--tw-button-padding-inline: var(--t-spacing-3);
+
+ &[data-color='neutral'][data-variant='outline'],
+ &[data-elevated][data-color='neutral'][data-variant='outline'] {
+ --tw-button-color: var(--t-font-color-primary);
+ }
}
diff --git a/packages/twenty-ui/src/components/input/MainButton/__stories__/MainButton.stories.tsx b/packages/twenty-ui/src/components/input/MainButton/__stories__/MainButton.stories.tsx
index 65930dfdb32..8d0ee6472cd 100644
--- a/packages/twenty-ui/src/components/input/MainButton/__stories__/MainButton.stories.tsx
+++ b/packages/twenty-ui/src/components/input/MainButton/__stories__/MainButton.stories.tsx
@@ -89,9 +89,39 @@ export const Loading: Story = {
await expect(button).toHaveAttribute('aria-busy', 'true');
await expect(button).toHaveClass('unavailable-action');
await expect(getComputedStyle(button).fontWeight).toBe('600');
+ await expect(button.querySelector('div')).toHaveStyle({
+ borderColor: getComputedStyle(button).color,
+ });
+ },
+};
+
+export const Outline: Story = {
+ ...Display,
+ args: { variant: 'outline' },
+ play: async ({ canvasElement }) => {
+ const button = within(canvasElement).getByRole('button');
+ const buttonStyle = getComputedStyle(button);
+ const primaryColor = buttonStyle
+ .getPropertyValue('--t-font-color-primary')
+ .trim();
+
+ await expect(button).toBeEnabled();
+ await expect(buttonStyle.color).toBe(primaryColor);
+ await userEvent.hover(button);
+ await expect(getComputedStyle(button).color).toBe(primaryColor);
},
};
+export const OutlineDark: Story = {
+ ...Outline,
+ globals: { colorScheme: 'dark' },
+};
+
+export const LoadingOutline: Story = {
+ ...Loading,
+ args: { ...Loading.args, variant: 'outline' },
+};
+
export const DisabledOutline: Story = {
...Display,
args: { variant: 'outline', elevated: false, disabled: true, onClick: fn() },