|
@@ -9,6 +9,7 @@ import { Divider } from '~components/Primitives/Divider'
|
9
|
9
|
import { IconButton } from '~components/Primitives/IconButton/IconButton'
|
10
|
10
|
import { SmallIcon } from '~components/Primitives/SmallIcon'
|
11
|
11
|
import { breakpoints } from '~components/breakpoints'
|
|
12
|
+import { preventEvent } from '~components/preventEvent'
|
12
|
13
|
|
13
|
14
|
const canDeleteSelector = (s: TDSnapshot) => {
|
14
|
15
|
return Object.keys(s.document.pages).length > 1
|
|
@@ -134,9 +135,12 @@ export const StyledDialogOverlay = styled(Dialog.Overlay, {
|
134
|
135
|
height: '100%',
|
135
|
136
|
})
|
136
|
137
|
|
137
|
|
-function DialogAction({ ...rest }: RowButtonProps & { onSelect: (e: Event) => void }) {
|
|
138
|
+function DialogAction({
|
|
139
|
+ onSelect,
|
|
140
|
+ ...rest
|
|
141
|
+}: RowButtonProps & { onSelect: (e: React.SyntheticEvent<HTMLButtonElement, Event>) => void }) {
|
138
|
142
|
return (
|
139
|
|
- <Dialog.Action asChild>
|
|
143
|
+ <Dialog.Action asChild onClick={onSelect} onSelect={onSelect}>
|
140
|
144
|
<RowButton {...rest} />
|
141
|
145
|
</Dialog.Action>
|
142
|
146
|
)
|