refactor: file preview modal header on mobile

This commit is contained in:
Aman Harwara
2023-01-28 00:33:30 +05:30
parent b3562dca69
commit 0a2b66ec0a
4 changed files with 74 additions and 25 deletions

View File

@@ -146,7 +146,7 @@ const Modal = ({
togglePopover={() => setShowAdvanced((show) => !show)}
align="start"
portal={false}
className="!fixed w-1/2 !min-w-0 divide-y divide-border border border-border"
className="!fixed divide-y divide-border border border-border"
>
{extraActions
.filter((action) => action.type !== 'cancel')
@@ -157,7 +157,10 @@ const Modal = ({
action.type === 'destructive' && 'text-danger',
)}
key={index}
onClick={action.onClick}
onClick={() => {
action.onClick()
setShowAdvanced(false)
}}
disabled={action.disabled}
>
{action.label}