fix: Focus submit button by default in confirmation dialogs

fix: Move collection delete to use confirmation dialog
closes #3446
This commit is contained in:
Tom Moor
2022-05-15 16:21:42 +01:00
parent b152b9f17b
commit 4c15f27bb2
6 changed files with 50 additions and 49 deletions

View File

@@ -67,6 +67,7 @@ const Modal: React.FC<Props> = ({
<Backdrop $isCentered={isCentered} {...props}>
<Dialog
{...dialog}
aria-label={typeof title === "string" ? title : undefined}
preventBodyScroll
hideOnEsc
hideOnClickOutside={!!isCentered}
@@ -75,7 +76,12 @@ const Modal: React.FC<Props> = ({
{(props) =>
isCentered && !isMobile ? (
<Small {...props}>
<Centered onClick={(ev) => ev.stopPropagation()} column>
<Centered
onClick={(ev) => ev.stopPropagation()}
column
reverse
>
<SmallContent shadow>{children}</SmallContent>
<Header>
{title && (
<Text as="span" size="large">
@@ -88,7 +94,6 @@ const Modal: React.FC<Props> = ({
</NudeButton>
</Text>
</Header>
<SmallContent shadow>{children}</SmallContent>
</Centered>
</Small>
) : (