Skip to content

Commit

Permalink
fix button spacing and delete modal autosizing
Browse files Browse the repository at this point in the history
  • Loading branch information
gtarpenning committed Dec 11, 2024
1 parent f0015a3 commit e7ced6c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ const ObjectVersionPageInner: React.FC<{
}
headerContent={
<Tailwind>
<div className="grid w-full auto-cols-max grid-flow-col gap-[16px] text-[14px]">
<div className="grid w-full grid-flow-col grid-cols-[auto_auto_1fr_auto] gap-[16px] text-[14px]">
<div className="block">
<p className="text-moon-500">Name</p>
<div className="flex items-center">
Expand Down Expand Up @@ -256,10 +256,9 @@ const ObjectVersionPageInner: React.FC<{
<p>{refExtra}</p>
</div>
)}
</div>
<div className="flex-grow" />
<div className="ml-1 flex">
<DeleteObjectButtonWithModal objVersionSchema={objectVersion} />
<div className="ml-auto">
<DeleteObjectButtonWithModal objVersionSchema={objectVersion} />
</div>
</div>
</Tailwind>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const OpVersionPageInner: React.FC<{
title={opVersionText(opId, versionIndex)}
headerContent={
<Tailwind>
<div className="grid w-full auto-cols-max grid-flow-col gap-[16px] text-[14px]">
<div className="grid w-full grid-flow-col grid-cols-[auto_auto_1fr_auto] gap-[16px] text-[14px]">
<div className="block">
<p className="text-moon-500">Name</p>
<div className="flex items-center">
Expand Down Expand Up @@ -139,8 +139,7 @@ const OpVersionPageInner: React.FC<{
<p>-</p>
)}
</div>
<div className="flex-grow" />
<div className="ml-1 flex">
<div className="block">
<DeleteObjectButtonWithModal objVersionSchema={opVersion} />
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
Dialog,
Dialog as MaterialDialog,
DialogActions as MaterialDialogActions,
DialogContent as MaterialDialogContent,
DialogTitle as MaterialDialogTitle,
Expand All @@ -24,6 +24,14 @@ interface DeleteModalProps {
onSuccess?: () => void;
}

const Dialog = styled(MaterialDialog)`
.MuiDialog-paper {
min-width: 400px;
max-width: min(800px, 90vw);
width: auto !important;
}
`;

export const DeleteModal: React.FC<DeleteModalProps> = ({
open,
onClose,
Expand Down Expand Up @@ -55,12 +63,10 @@ export const DeleteModal: React.FC<DeleteModalProps> = ({
onClose={() => {
onClose();
setError(null);
}}
maxWidth="xs"
fullWidth>
}}>
<Tailwind>
<DialogTitle>Delete {deleteTargetStr}</DialogTitle>
<DialogContent style={{overflow: 'hidden'}}>
<DialogContent className="overflow-hidden">
<div className="mb-16">
{error != null ? (
<p style={{color: 'red'}}>{error}</p>
Expand Down

0 comments on commit e7ced6c

Please sign in to comment.