[Glitch] Collection share modal cleanup
Port 03b2f77ad2 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
1 parent
26ce025df1
commit
fe7dc293c4
7 files changed
+39
-35
No files matched your search
+9
-5
@@ -3,7 +3,11 @@ import { useCallback } from 'react';
|
||||
import { FormattedMessage, defineMessages } from 'react-intl';
|
||||
|
||||
import { Button } from 'flavours/glitch/components/button';
|
||||
import { ModalShell } from 'flavours/glitch/components/modal_shell';
|
||||
import {
|
||||
ModalShell,
|
||||
ModalShellActions,
|
||||
ModalShellBody,
|
||||
} from 'flavours/glitch/components/modal_shell';
|
||||
|
||||
export interface BaseConfirmationModalProps {
|
||||
onClose: () => void;
|
||||
@@ -66,14 +70,14 @@ export const ConfirmationModal: React.FC<
|
||||
|
||||
return (
|
||||
<ModalShell>
|
||||
<ModalShell.Body>
|
||||
<ModalShellBody>
|
||||
<h1 id={titleId}>{title}</h1>
|
||||
{message && <p>{message}</p>}
|
||||
|
||||
{extraContent ?? children}
|
||||
</ModalShell.Body>
|
||||
</ModalShellBody>
|
||||
|
||||
<ModalShell.Actions>
|
||||
<ModalShellActions>
|
||||
<button onClick={onClose} className='link-button' type='button'>
|
||||
{cancel ?? (
|
||||
<FormattedMessage
|
||||
@@ -107,7 +111,7 @@ export const ConfirmationModal: React.FC<
|
||||
{confirm}
|
||||
</Button>
|
||||
{/* eslint-enable */}
|
||||
</ModalShell.Actions>
|
||||
</ModalShellActions>
|
||||
</ModalShell>
|
||||
);
|
||||
};
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
DomainBlockModal,
|
||||
ReportModal,
|
||||
ReportCollectionModal,
|
||||
ShareCollectionModal,
|
||||
SettingsModal,
|
||||
EmbedModal,
|
||||
ListAdder,
|
||||
@@ -86,7 +85,7 @@ export const MODAL_COMPONENTS = {
|
||||
'DOMAIN_BLOCK': DomainBlockModal,
|
||||
'REPORT': ReportModal,
|
||||
'REPORT_COLLECTION': ReportCollectionModal,
|
||||
'SHARE_COLLECTION': ShareCollectionModal,
|
||||
'SHARE_COLLECTION': () => import('@/flavours/glitch/features/collections/detail/share_modal').then(module => ({ default: module.CollectionShareModal })),
|
||||
'SETTINGS': SettingsModal,
|
||||
'DEPRECATED_SETTINGS': () => Promise.resolve({ default: DeprecatedSettingsModal }),
|
||||
'ACTIONS': () => Promise.resolve({ default: ActionsModal }),
|
||||
|
||||
Reference in new issue
Block a user