mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-02-13 16:13:24 +01:00
extract wide modal styles
This commit is contained in:
parent
6fa0cfc53a
commit
f67fbd1978
4 changed files with 11 additions and 9 deletions
|
@ -27,7 +27,6 @@ import {
|
||||||
getFileNameExt,
|
getFileNameExt,
|
||||||
mimeTypeToExt,
|
mimeTypeToExt,
|
||||||
} from '../../../utils/mimeTypes';
|
} from '../../../utils/mimeTypes';
|
||||||
import * as css from './style.css';
|
|
||||||
import { stopPropagation } from '../../../utils/keyboard';
|
import { stopPropagation } from '../../../utils/keyboard';
|
||||||
import {
|
import {
|
||||||
decryptFile,
|
decryptFile,
|
||||||
|
@ -36,6 +35,7 @@ import {
|
||||||
mxcUrlToHttp,
|
mxcUrlToHttp,
|
||||||
} from '../../../utils/matrix';
|
} from '../../../utils/matrix';
|
||||||
import { useMediaAuthentication } from '../../../hooks/useMediaAuthentication';
|
import { useMediaAuthentication } from '../../../hooks/useMediaAuthentication';
|
||||||
|
import { ModalWide } from '../../../styles/Modal.css';
|
||||||
|
|
||||||
const renderErrorButton = (retry: () => void, text: string) => (
|
const renderErrorButton = (retry: () => void, text: string) => (
|
||||||
<TooltipProvider
|
<TooltipProvider
|
||||||
|
@ -111,7 +111,7 @@ export function ReadTextFile({ body, mimeType, url, encInfo, renderViewer }: Rea
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Modal
|
<Modal
|
||||||
className={css.ModalWide}
|
className={ModalWide}
|
||||||
size="500"
|
size="500"
|
||||||
onContextMenu={(evt: any) => evt.stopPropagation()}
|
onContextMenu={(evt: any) => evt.stopPropagation()}
|
||||||
>
|
>
|
||||||
|
@ -199,7 +199,7 @@ export function ReadPdfFile({ body, mimeType, url, encInfo, renderViewer }: Read
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Modal
|
<Modal
|
||||||
className={css.ModalWide}
|
className={ModalWide}
|
||||||
size="500"
|
size="500"
|
||||||
onContextMenu={(evt: any) => evt.stopPropagation()}
|
onContextMenu={(evt: any) => evt.stopPropagation()}
|
||||||
>
|
>
|
||||||
|
|
|
@ -28,6 +28,7 @@ import { FALLBACK_MIMETYPE } from '../../../utils/mimeTypes';
|
||||||
import { stopPropagation } from '../../../utils/keyboard';
|
import { stopPropagation } from '../../../utils/keyboard';
|
||||||
import { decryptFile, downloadEncryptedMedia, mxcUrlToHttp } from '../../../utils/matrix';
|
import { decryptFile, downloadEncryptedMedia, mxcUrlToHttp } from '../../../utils/matrix';
|
||||||
import { useMediaAuthentication } from '../../../hooks/useMediaAuthentication';
|
import { useMediaAuthentication } from '../../../hooks/useMediaAuthentication';
|
||||||
|
import { ModalWide } from '../../../styles/Modal.css';
|
||||||
|
|
||||||
type RenderViewerProps = {
|
type RenderViewerProps = {
|
||||||
src: string;
|
src: string;
|
||||||
|
@ -121,7 +122,7 @@ export const ImageContent = as<'div', ImageContentProps>(
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Modal
|
<Modal
|
||||||
className={css.ModalWide}
|
className={ModalWide}
|
||||||
size="500"
|
size="500"
|
||||||
onContextMenu={(evt: any) => evt.stopPropagation()}
|
onContextMenu={(evt: any) => evt.stopPropagation()}
|
||||||
>
|
>
|
||||||
|
|
|
@ -30,8 +30,3 @@ export const AbsoluteFooter = style([
|
||||||
right: config.space.S100,
|
right: config.space.S100,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
export const ModalWide = style({
|
|
||||||
minWidth: '85vw',
|
|
||||||
minHeight: '90vh',
|
|
||||||
});
|
|
||||||
|
|
6
src/app/styles/Modal.css.ts
Normal file
6
src/app/styles/Modal.css.ts
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
import { style } from '@vanilla-extract/css';
|
||||||
|
|
||||||
|
export const ModalWide = style({
|
||||||
|
minWidth: '85vw',
|
||||||
|
minHeight: '90vh',
|
||||||
|
});
|
Loading…
Reference in a new issue