Add share dialog for collections (#37986)
This commit is contained in:
1 parent
bca57020a0
commit
7970eb392a
17 files changed
+498
-72
No files matched your search
@@ -0,0 +1,56 @@
|
||||
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;
|
||||
Reference in new issue
Block a user