Files
mastodon/app/javascript/flavours/glitch/components/modal_shell/index.tsx
diondiondion 9ed23cc8b2 [Glitch] Add share dialog for collections
Port 7970eb392a to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2026-02-27 21:31:10 +01:00

57 lines
1.2 KiB
TypeScript

import classNames from 'classnames';
interface SimpleComponentProps {
className?: string;
children?: React.ReactNode;
}
interface ModalShellComponent extends React.FC<SimpleComponentProps> {
Body: React.FC<SimpleComponentProps>;
Actions: React.FC<SimpleComponentProps>;
}
export const ModalShell: ModalShellComponent = ({ children, className }) => {
return (
<div
className={classNames(
'modal-root__modal',
'safety-action-modal',
className,
)}
>
{children}
</div>
);
};
const ModalShellBody: ModalShellComponent['Body'] = ({
children,
className,
}) => {
return (
<div className='safety-action-modal__top'>
<div
className={classNames('safety-action-modal__confirmation', className)}
>
{children}
</div>
</div>
);
};
const ModalShellActions: ModalShellComponent['Actions'] = ({
children,
className,
}) => {
return (
<div className='safety-action-modal__bottom'>
<div className={classNames('safety-action-modal__actions', className)}>
{children}
</div>
</div>
);
};
ModalShell.Body = ModalShellBody;
ModalShell.Actions = ModalShellActions;