We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abc66b6 commit 950999bCopy full SHA for 950999b
packages/mdx/src/mini-editor/expand-button.tsx
@@ -16,8 +16,22 @@ export function ExpandButton({
16
className?: string
17
}) {
18
const [expanded, setExpanded] = React.useState(false)
19
+ const [dialogSupported, setDialogSupported] =
20
+ React.useState(true)
21
const ref = React.useRef<any>(null)
22
const files = step.files
23
+
24
+ // check if <dialog /> is supported
25
+ React.useEffect(() => {
26
+ if (ref.current && !ref.current.showModal) {
27
+ setDialogSupported(false)
28
+ }
29
+ }, [])
30
31
+ if (!dialogSupported) {
32
+ return null
33
34
35
return (
36
<>
37
<ExpandIcon
0 commit comments