feat: Require use of a preset dialog size; adjust dialog sizing (#2684)
This commit is contained in:
parent
0488b7b5c6
commit
3b0fb1562d
@ -19,7 +19,7 @@ const useRefState = <T,>() => {
|
|||||||
export const Dialog = (props: {
|
export const Dialog = (props: {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
className?: string;
|
className?: string;
|
||||||
maxWidth?: number;
|
small?: boolean;
|
||||||
onCloseRequest(): void;
|
onCloseRequest(): void;
|
||||||
title: React.ReactNode;
|
title: React.ReactNode;
|
||||||
autofocus?: boolean;
|
autofocus?: boolean;
|
||||||
@ -76,7 +76,7 @@ export const Dialog = (props: {
|
|||||||
<Modal
|
<Modal
|
||||||
className={clsx("Dialog", props.className)}
|
className={clsx("Dialog", props.className)}
|
||||||
labelledBy="dialog-title"
|
labelledBy="dialog-title"
|
||||||
maxWidth={props.maxWidth}
|
maxWidth={props.small ? 550 : 800}
|
||||||
onCloseRequest={props.onCloseRequest}
|
onCloseRequest={props.onCloseRequest}
|
||||||
>
|
>
|
||||||
<Island padding={4} ref={setIslandNode}>
|
<Island padding={4} ref={setIslandNode}>
|
||||||
|
@ -24,7 +24,7 @@ export const ErrorDialog = ({
|
|||||||
<>
|
<>
|
||||||
{modalIsShown && (
|
{modalIsShown && (
|
||||||
<Dialog
|
<Dialog
|
||||||
maxWidth={500}
|
small
|
||||||
onCloseRequest={handleClose}
|
onCloseRequest={handleClose}
|
||||||
title={t("errorDialog.title")}
|
title={t("errorDialog.title")}
|
||||||
>
|
>
|
||||||
|
@ -262,11 +262,7 @@ export const ExportDialog = ({
|
|||||||
ref={triggerButton}
|
ref={triggerButton}
|
||||||
/>
|
/>
|
||||||
{modalIsShown && (
|
{modalIsShown && (
|
||||||
<Dialog
|
<Dialog onCloseRequest={handleClose} title={t("buttons.export")}>
|
||||||
maxWidth={800}
|
|
||||||
onCloseRequest={handleClose}
|
|
||||||
title={t("buttons.export")}
|
|
||||||
>
|
|
||||||
<ExportModal
|
<ExportModal
|
||||||
elements={elements}
|
elements={elements}
|
||||||
appState={appState}
|
appState={appState}
|
||||||
|
@ -97,7 +97,7 @@ export const PasteChartDialog = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog
|
<Dialog
|
||||||
maxWidth={500}
|
small
|
||||||
onCloseRequest={handleClose}
|
onCloseRequest={handleClose}
|
||||||
title={t("labels.pasteCharts")}
|
title={t("labels.pasteCharts")}
|
||||||
className={"PasteChartDialog"}
|
className={"PasteChartDialog"}
|
||||||
|
@ -130,11 +130,7 @@ export const ShortcutsDialog = ({ onClose }: { onClose?: () => void }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Dialog
|
<Dialog onCloseRequest={handleClose} title={t("shortcutsDialog.title")}>
|
||||||
maxWidth={900}
|
|
||||||
onCloseRequest={handleClose}
|
|
||||||
title={t("shortcutsDialog.title")}
|
|
||||||
>
|
|
||||||
<Columns>
|
<Columns>
|
||||||
<Column>
|
<Column>
|
||||||
<ShortcutIsland caption={t("shortcutsDialog.shapes")}>
|
<ShortcutIsland caption={t("shortcutsDialog.shapes")}>
|
||||||
|
@ -123,11 +123,7 @@ const RoomDialog = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<Dialog
|
<Dialog small onCloseRequest={handleClose} title={t("labels.createRoom")}>
|
||||||
maxWidth={800}
|
|
||||||
onCloseRequest={handleClose}
|
|
||||||
title={t("labels.createRoom")}
|
|
||||||
>
|
|
||||||
{renderRoomDialog()}
|
{renderRoomDialog()}
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user