Fix shrinked horizontal separator (#9192)
Related issue: https://discord.com/channels/1130383047699738754/1317185369577492532/1317185369577492532. TL;DR: When used in a flex container, the separators gets hidden when the container becomes scrollable. We must ensure they can't shrink. --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
committed by
GitHub
parent
e153168edb
commit
e1c99beaa4
@ -106,7 +106,7 @@ export const SignInUpGlobalScopeForm = () => {
|
|||||||
{authProviders.google && <SignInUpWithGoogle />}
|
{authProviders.google && <SignInUpWithGoogle />}
|
||||||
{authProviders.microsoft && <SignInUpWithMicrosoft />}
|
{authProviders.microsoft && <SignInUpWithMicrosoft />}
|
||||||
{(authProviders.google || authProviders.microsoft) && (
|
{(authProviders.google || authProviders.microsoft) && (
|
||||||
<HorizontalSeparator visible />
|
<HorizontalSeparator />
|
||||||
)}
|
)}
|
||||||
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
|
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
|
||||||
<FormProvider {...form}>
|
<FormProvider {...form}>
|
||||||
|
|||||||
@ -37,7 +37,7 @@ export const SignInUpWorkspaceScopeForm = () => {
|
|||||||
workspaceAuthProviders.microsoft ||
|
workspaceAuthProviders.microsoft ||
|
||||||
workspaceAuthProviders.sso.length > 0) &&
|
workspaceAuthProviders.sso.length > 0) &&
|
||||||
workspaceAuthProviders.password ? (
|
workspaceAuthProviders.password ? (
|
||||||
<HorizontalSeparator visible />
|
<HorizontalSeparator />
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
{workspaceAuthProviders.password && <SignInUpWithCredentials />}
|
{workspaceAuthProviders.password && <SignInUpWithCredentials />}
|
||||||
|
|||||||
@ -1,15 +1,5 @@
|
|||||||
/* @license Enterprise */
|
/* @license Enterprise */
|
||||||
|
|
||||||
import {
|
|
||||||
HorizontalSeparator,
|
|
||||||
Button,
|
|
||||||
H2Title,
|
|
||||||
IconCheck,
|
|
||||||
IconCopy,
|
|
||||||
IconDownload,
|
|
||||||
IconUpload,
|
|
||||||
Section,
|
|
||||||
} from 'twenty-ui';
|
|
||||||
import { parseSAMLMetadataFromXMLFile } from '@/settings/security/utils/parseSAMLMetadataFromXMLFile';
|
import { parseSAMLMetadataFromXMLFile } from '@/settings/security/utils/parseSAMLMetadataFromXMLFile';
|
||||||
import { SnackBarVariant } from '@/ui/feedback/snack-bar-manager/components/SnackBar';
|
import { SnackBarVariant } from '@/ui/feedback/snack-bar-manager/components/SnackBar';
|
||||||
import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';
|
import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';
|
||||||
@ -18,6 +8,16 @@ import { useTheme } from '@emotion/react';
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { ChangeEvent, useRef } from 'react';
|
import { ChangeEvent, useRef } from 'react';
|
||||||
import { useFormContext } from 'react-hook-form';
|
import { useFormContext } from 'react-hook-form';
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
H2Title,
|
||||||
|
HorizontalSeparator,
|
||||||
|
IconCheck,
|
||||||
|
IconCopy,
|
||||||
|
IconDownload,
|
||||||
|
IconUpload,
|
||||||
|
Section,
|
||||||
|
} from 'twenty-ui';
|
||||||
import { REACT_APP_SERVER_BASE_URL } from '~/config';
|
import { REACT_APP_SERVER_BASE_URL } from '~/config';
|
||||||
import { isDefined } from '~/utils/isDefined';
|
import { isDefined } from '~/utils/isDefined';
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ export const SettingsSSOSAMLForm = () => {
|
|||||||
title="Download file"
|
title="Download file"
|
||||||
></Button>
|
></Button>
|
||||||
</StyledContainer>
|
</StyledContainer>
|
||||||
<HorizontalSeparator visible={true} text={'Or'} />
|
<HorizontalSeparator text={'Or'} />
|
||||||
<StyledContainer>
|
<StyledContainer>
|
||||||
<StyledLinkContainer>
|
<StyledLinkContainer>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
|||||||
@ -10,6 +10,7 @@ type HorizontalSeparatorProps = {
|
|||||||
const StyledSeparator = styled.div<HorizontalSeparatorProps>`
|
const StyledSeparator = styled.div<HorizontalSeparatorProps>`
|
||||||
background-color: ${({ theme, color }) => color ?? theme.border.color.medium};
|
background-color: ${({ theme, color }) => color ?? theme.border.color.medium};
|
||||||
height: ${({ visible }) => (visible ? '1px' : 0)};
|
height: ${({ visible }) => (visible ? '1px' : 0)};
|
||||||
|
flex-shrink: 0;
|
||||||
margin-bottom: ${({ theme, noMargin }) => (noMargin ? 0 : theme.spacing(3))};
|
margin-bottom: ${({ theme, noMargin }) => (noMargin ? 0 : theme.spacing(3))};
|
||||||
margin-top: ${({ theme, noMargin }) => (noMargin ? 0 : theme.spacing(3))};
|
margin-top: ${({ theme, noMargin }) => (noMargin ? 0 : theme.spacing(3))};
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
Reference in New Issue
Block a user