Skip to content

The open alternative to Salesforce, designed for AI.

Fix custom domain settings spacing (#26007)

Thomas des Francs2b1f7eeb28e9
diff --git a/packages/twenty-front/src/modules/settings/domains/components/SettingsCustomDomain.tsx b/packages/twenty-front/src/modules/settings/domains/components/SettingsCustomDomain.tsx
index 32a33fbe91e..0c9b0723c40 100644
--- a/packages/twenty-front/src/modules/settings/domains/components/SettingsCustomDomain.tsx
+++ b/packages/twenty-front/src/modules/settings/domains/components/SettingsCustomDomain.tsx
@@ -15,7 +15,7 @@ import { SettingsPath } from 'twenty-shared/types';
import { getSettingsPath } from 'twenty-shared/utils';
import { IconReload, IconTrash } from 'twenty-ui/icon';
import { H2Title } from 'twenty-ui/primitives/typography';
-import { Button, ButtonGroup } from 'twenty-ui/primitives/input';
+import { Button } from 'twenty-ui/primitives/input';
import { Section } from 'twenty-ui/primitives/layout';
import { themeCssVariables } from 'twenty-ui/theme-constants';
import { useNavigateSettings } from '~/hooks/useNavigateSettings';
@@ -26,22 +26,10 @@ const StyledDomainFormWrapper = styled.div`
gap: ${themeCssVariables.spacing[2]};
`;
-const StyledButtonGroupContainer = styled.div`
- > * > :not(:first-of-type) > button {
- border-left: none;
- }
-`;
-
-const StyledButtonContainer = styled.div`
+const StyledButtonsContainer = styled.div`
align-self: flex-start;
-`;
-
-const StyledRecordsWrapper = styled.div`
- margin-top: ${themeCssVariables.spacing[2]};
-
- & > :not(:first-of-type) {
- margin-top: ${themeCssVariables.spacing[4]};
- }
+ display: flex;
+ gap: ${themeCssVariables.spacing[2]};
`;
export const SettingsCustomDomain = () => {
@@ -102,37 +90,27 @@ export const SettingsCustomDomain = () => {
fullWidth
/>
{currentWorkspace?.customDomain && (
- <StyledButtonGroupContainer>
- <ButtonGroup>
- <StyledButtonContainer>
- <Button
- isLoading={isRecordsLoading}
- Icon={IconReload}
- title={t`Reload`}
- variant="primary"
- onClick={() => checkCustomDomainRecords()}
- type="button"
- />
- </StyledButtonContainer>
- <StyledButtonContainer>
- <Button
- Icon={IconTrash}
- variant="primary"
- onClick={handleDelete}
- />
- </StyledButtonContainer>
- </ButtonGroup>
- </StyledButtonGroupContainer>
+ <StyledButtonsContainer>
+ <Button
+ isLoading={isRecordsLoading}
+ Icon={IconReload}
+ title={t`Reload`}
+ variant="primary"
+ onClick={() => checkCustomDomainRecords()}
+ type="button"
+ />
+ <Button
+ Icon={IconTrash}
+ variant="primary"
+ onClick={handleDelete}
+ />
+ </StyledButtonsContainer>
)}
</StyledDomainFormWrapper>
- {currentWorkspace?.customDomain && (
- <StyledRecordsWrapper>
- {customDomainRecords && (
- <SettingsDomainRecords records={customDomainRecords.records} />
- )}
- </StyledRecordsWrapper>
- )}
</Section>
+ {currentWorkspace?.customDomain && customDomainRecords && (
+ <SettingsDomainRecords records={customDomainRecords.records} />
+ )}
</SettingsPageContainer>
</SettingsPageLayout>
);