diff --git a/web/modals/chat/sidebar-list-modal.react.js b/web/modals/chat/sidebar-list-modal.react.js --- a/web/modals/chat/sidebar-list-modal.react.js +++ b/web/modals/chat/sidebar-list-modal.react.js @@ -115,7 +115,7 @@ } return ( - +
h2 { - font-size: var(--xl-font-20); - font-weight: var(--bold); - color: var(--fg); + +div.modalHeader { display: flex; + justify-content: space-between; align-items: center; -} -div.modal-header > h2 svg { - padding-right: 8px; - display: flex; + padding: 32px 32px 0px 32px; } -@media only screen and (-webkit-min-device-pixel-ratio: 2), - only screen and (min--moz-device-pixel-ratio: 2), - only screen and (-o-min-device-pixel-ratio: 2/1), - only screen and (min-device-pixel-ratio: 2), - only screen and (min-resolution: 320dpi), - only screen and (min-resolution: 2dppx) { - div.modal-container { - background: var(--bg); - } +h2.title { + font-size: 20px; + font-weight: 500; + line-height: 32px; + color: var(--fg); + display: flex; + align-items: center; + column-gap: 8px; } diff --git a/web/modals/modal.react.js b/web/modals/modal.react.js --- a/web/modals/modal.react.js +++ b/web/modals/modal.react.js @@ -6,15 +6,14 @@ import SWMansionIcon, { type Icon } from '../SWMansionIcon.react'; import css from './modal.css'; -export type ModalSize = 'small' | 'large'; +export type ModalSize = 'small' | 'large' | 'fit-content'; type Props = { - +name: React.Node, + +name: string, +icon?: Icon, +onClose: () => void, +withCloseButton?: boolean, +children?: React.Node, +size?: ModalSize, - +fixedHeight?: boolean, }; function Modal(props: Props): React.Node { @@ -22,7 +21,6 @@ size = 'small', children, onClose, - fixedHeight = true, name, icon, withCloseButton = false, @@ -53,34 +51,21 @@ } }, []); - const overlayClasses = React.useMemo( - () => - classNames(css['modal-overlay'], { - [css['resizable-modal-overlay']]: !fixedHeight, - }), - [fixedHeight], - ); const modalContainerClasses = React.useMemo( () => - classNames(css['modal-container'], { - [css['large-modal-container']]: size === 'large', + classNames(css.modalContainer, { + [css.modalContainerLarge]: size === 'large', + [css.modalContainerSmall]: size === 'small', }), [size], ); - const modalClasses = React.useMemo( - () => - classNames(css['modal'], { - [css['fixed-height-modal']]: fixedHeight, - }), - [fixedHeight], - ); const cornerCloseButton = React.useMemo(() => { if (!withCloseButton) { return null; } return ( - + ); @@ -95,23 +80,21 @@ return (
-
-
- {cornerCloseButton} -

- {headerIcon} - {name} -

-
- {children} +
+

+ {headerIcon} + {name} +

+ {cornerCloseButton}
+ {children}
); diff --git a/web/theme.css b/web/theme.css --- a/web/theme.css +++ b/web/theme.css @@ -143,4 +143,6 @@ --color-selector-active-bg: var(--shades-black-80); --relationship-modal-color: var(--shades-black-60); --arrow-extension-color: var(--shades-black-60); + --modal-close-color: var(--shades-black-60); + --modal-close-color-hover: var(--shades-white-100); }