mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Make dialogs look better on mobile (#908)
* Standardize mobile media query * Refactor & add mobile support to dialogs * back & close icons
This commit is contained in:
parent
c85315650f
commit
668f8ec4a6
15 changed files with 328 additions and 201 deletions
|
@ -1,10 +1,11 @@
|
|||
import "./Modal.css";
|
||||
import "./Modal.scss";
|
||||
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { createPortal } from "react-dom";
|
||||
import { KEYS } from "../keys";
|
||||
|
||||
export function Modal(props: {
|
||||
className?: string;
|
||||
children: React.ReactNode;
|
||||
maxWidth?: number;
|
||||
onCloseRequest(): void;
|
||||
|
@ -20,7 +21,7 @@ export function Modal(props: {
|
|||
};
|
||||
return createPortal(
|
||||
<div
|
||||
className="Modal"
|
||||
className={`Modal ${props.className ?? ""}`}
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
onKeyDown={handleKeydown}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue