fix: Incorrect dialog padding

This commit is contained in:
Tom Moor committed 2024-07-10 08:27:43 -04:00
1 parent f02bbc3942
commit 01bbc48c01
5 files changed
+11 -2

No files matched your search

+1
View File
@@ -112,6 +112,7 @@ export const editCollectionPermissions = createAction({
stores.dialogs.openModal({
title: t("Share this collection"),
style: { marginBottom: -12 },
content: (
<SharePopover
collection={collection}
+1
View File
@@ -348,6 +348,7 @@ export const shareDocument = createAction({
}
stores.dialogs.openModal({
style: { marginBottom: -12 },
title: t("Share this document"),
content: (
<SharePopover
+1
View File
@@ -25,6 +25,7 @@ function Dialogs() {
fullscreen={modal.fullscreen ?? false}
onRequestClose={() => dialogs.closeModal(id)}
title={modal.title}
style={modal.style}
>
{modal.content}
</Modal>
+4 -2
View File
@@ -25,6 +25,7 @@ type Props = {
isOpen: boolean;
fullscreen?: boolean;
title?: React.ReactNode;
style?: React.CSSProperties;
onRequestClose: () => void;
};
@@ -33,6 +34,7 @@ const Modal: React.FC<Props> = ({
isOpen,
fullscreen = true,
title = "Untitled",
style,
onRequestClose,
}: Props) => {
const dialog = useDialogState({
@@ -115,7 +117,7 @@ const Modal: React.FC<Props> = ({
column
reverse
>
<SmallContent shadow>
<SmallContent style={style} shadow>
<ErrorBoundary component="div">{children}</ErrorBoundary>
</SmallContent>
<Header>
@@ -282,7 +284,7 @@ const Small = styled.div`
`;
const SmallContent = styled(Scrollable)`
padding: 12px 24px;
padding: 12px 24px 24px;
`;
export default observer(Modal);
+4
View File
@@ -7,6 +7,7 @@ type DialogDefinition = {
content: React.ReactNode;
isOpen: boolean;
fullscreen?: boolean;
style?: React.CSSProperties;
};
export default class DialogsStore {
@@ -47,10 +48,12 @@ export default class DialogsStore {
content,
fullscreen,
replace,
style,
}: {
title: string;
fullscreen?: boolean;
content: React.ReactNode;
style?: React.CSSProperties;
replace?: boolean;
}) => {
setTimeout(
@@ -65,6 +68,7 @@ export default class DialogsStore {
title,
content,
fullscreen,
style,
isOpen: true,
});
}),