mirror of
https://github.com/suitenumerique/docs
synced 2026-04-21 13:37:20 +00:00
🐛(frontend) remove horizontal line when no elements
Some checks are pending
Update crowdin sources / install-dependencies (push) Waiting to run
Update crowdin sources / synchronize-with-crowdin (push) Blocked by required conditions
Docker Hub Workflow / build-and-push-backend (push) Waiting to run
Docker Hub Workflow / build-and-push-frontend (push) Waiting to run
Docker Hub Workflow / build-and-push-y-provider (push) Waiting to run
Docker Hub Workflow / notify-argocd (push) Blocked by required conditions
Build and Push to GHCR / build-and-push-backend (push) Waiting to run
Build and Push to GHCR / build-and-push-frontend (push) Waiting to run
Build and Push to GHCR / build-and-push-y-provider (push) Waiting to run
Helmfile lint / helmfile-lint (push) Waiting to run
Frontend Workflow / install-dependencies (push) Waiting to run
Frontend Workflow / test-front (push) Blocked by required conditions
Frontend Workflow / lint-front (push) Blocked by required conditions
Frontend Workflow / test-e2e-chromium (push) Waiting to run
Frontend Workflow / test-e2e-other-browser (push) Blocked by required conditions
Frontend Workflow / bundle-size-check (push) Blocked by required conditions
Frontend Workflow / uikit-theme-checker (push) Blocked by required conditions
Main Workflow / lint-changelog (push) Waiting to run
Main Workflow / lint-spell-mistakes (push) Waiting to run
Main Workflow / install-dependencies (push) Waiting to run
Main Workflow / lint-git (push) Waiting to run
Main Workflow / check-changelog (push) Waiting to run
Main Workflow / lint-back (push) Waiting to run
Main Workflow / test-back (push) Blocked by required conditions
Some checks are pending
Update crowdin sources / install-dependencies (push) Waiting to run
Update crowdin sources / synchronize-with-crowdin (push) Blocked by required conditions
Docker Hub Workflow / build-and-push-backend (push) Waiting to run
Docker Hub Workflow / build-and-push-frontend (push) Waiting to run
Docker Hub Workflow / build-and-push-y-provider (push) Waiting to run
Docker Hub Workflow / notify-argocd (push) Blocked by required conditions
Build and Push to GHCR / build-and-push-backend (push) Waiting to run
Build and Push to GHCR / build-and-push-frontend (push) Waiting to run
Build and Push to GHCR / build-and-push-y-provider (push) Waiting to run
Helmfile lint / helmfile-lint (push) Waiting to run
Frontend Workflow / install-dependencies (push) Waiting to run
Frontend Workflow / test-front (push) Blocked by required conditions
Frontend Workflow / lint-front (push) Blocked by required conditions
Frontend Workflow / test-e2e-chromium (push) Waiting to run
Frontend Workflow / test-e2e-other-browser (push) Blocked by required conditions
Frontend Workflow / bundle-size-check (push) Blocked by required conditions
Frontend Workflow / uikit-theme-checker (push) Blocked by required conditions
Main Workflow / lint-changelog (push) Waiting to run
Main Workflow / lint-spell-mistakes (push) Waiting to run
Main Workflow / install-dependencies (push) Waiting to run
Main Workflow / lint-git (push) Waiting to run
Main Workflow / check-changelog (push) Waiting to run
Main Workflow / lint-back (push) Waiting to run
Main Workflow / test-back (push) Blocked by required conditions
When no elements are present in the doc share modals, a horizontal line is still displayed. This PR removes this line when there are no elements to display.
This commit is contained in:
parent
e39b03c272
commit
aed8ae7181
3 changed files with 42 additions and 27 deletions
|
|
@ -11,6 +11,7 @@ import { createGlobalStyle, css } from 'styled-components';
|
|||
import {
|
||||
Box,
|
||||
BoxButton,
|
||||
HorizontalSeparator,
|
||||
Icon,
|
||||
LoadMoreText,
|
||||
Loading,
|
||||
|
|
@ -165,19 +166,25 @@ export const QuickSearchGroupAccessRequest = ({
|
|||
}
|
||||
|
||||
return (
|
||||
<Box
|
||||
aria-label={t('List request access card')}
|
||||
className="--docs--share-access-request"
|
||||
$padding={{ horizontal: 'base' }}
|
||||
>
|
||||
<QuickSearchGroupAccessRequestStyle />
|
||||
<QuickSearchGroup
|
||||
group={accessRequestsData}
|
||||
renderElement={(accessRequest) => (
|
||||
<DocShareAccessRequestItem doc={doc} accessRequest={accessRequest} />
|
||||
)}
|
||||
/>
|
||||
</Box>
|
||||
<>
|
||||
<Box
|
||||
aria-label={t('List request access card')}
|
||||
className="--docs--share-access-request"
|
||||
$padding={{ horizontal: 'base' }}
|
||||
>
|
||||
<QuickSearchGroupAccessRequestStyle />
|
||||
<QuickSearchGroup
|
||||
group={accessRequestsData}
|
||||
renderElement={(accessRequest) => (
|
||||
<DocShareAccessRequestItem
|
||||
doc={doc}
|
||||
accessRequest={accessRequest}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</Box>
|
||||
<HorizontalSeparator $margin={{ vertical: 'sm' }} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,14 @@ import { useMemo } from 'react';
|
|||
import { useTranslation } from 'react-i18next';
|
||||
import { css } from 'styled-components';
|
||||
|
||||
import { Box, BoxButton, Icon, LoadMoreText, Text } from '@/components';
|
||||
import {
|
||||
Box,
|
||||
BoxButton,
|
||||
HorizontalSeparator,
|
||||
Icon,
|
||||
LoadMoreText,
|
||||
Text,
|
||||
} from '@/components';
|
||||
import { QuickSearchData, QuickSearchGroup } from '@/components/quick-search';
|
||||
import { useCunninghamTheme } from '@/cunningham';
|
||||
import { Doc, Role } from '@/docs/doc-management';
|
||||
|
|
@ -162,16 +169,19 @@ export const QuickSearchGroupInvitation = ({
|
|||
}
|
||||
|
||||
return (
|
||||
<Box
|
||||
aria-label={t('List invitation card')}
|
||||
$padding={{ horizontal: 'base' }}
|
||||
>
|
||||
<QuickSearchGroup
|
||||
group={invitationsData}
|
||||
renderElement={(invitation) => (
|
||||
<DocShareInvitationItem doc={doc} invitation={invitation} />
|
||||
)}
|
||||
/>
|
||||
</Box>
|
||||
<>
|
||||
<Box
|
||||
aria-label={t('List invitation card')}
|
||||
$padding={{ horizontal: 'base' }}
|
||||
>
|
||||
<QuickSearchGroup
|
||||
group={invitationsData}
|
||||
renderElement={(invitation) => (
|
||||
<DocShareInvitationItem doc={doc} invitation={invitation} />
|
||||
)}
|
||||
/>
|
||||
</Box>
|
||||
<HorizontalSeparator $margin={{ vertical: 'sm' }} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -291,9 +291,7 @@ export const DocShareModal = ({ doc, onClose, isRootDoc = true }: Props) => {
|
|||
{showMemberSection && isRootDoc && (
|
||||
<Box $padding={{ top: 'base' }}>
|
||||
<QuickSearchGroupAccessRequest doc={doc} />
|
||||
<HorizontalSeparator $margin={{ vertical: 'sm' }} />
|
||||
<QuickSearchGroupInvitation doc={doc} />
|
||||
<HorizontalSeparator $margin={{ vertical: 'sm' }} />
|
||||
<QuickSearchGroupMember doc={doc} />
|
||||
</Box>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in a new issue