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: 22px; - font-weight: 300; - color: var(--fg); + +div.modalHeader { + display: flex; + justify-content: space-between; + align-items: center; + 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); - } +div.title { + font-size: 20px; + font-weight: 500; + line-height: 26px; + color: var(--fg); } 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 @@ -3,19 +3,18 @@ import classNames from 'classnames'; import * as React from 'react'; +import SWMansionIcon from '../SWMansionIcon.react'; import css from './modal.css'; - -export type ModalSize = 'small' | 'large'; +export type ModalSize = 'small' | 'large' | 'fit-content'; type Props = { - +name: string, + +name: React.Node, +onClose: () => void, +children?: React.Node, +size?: ModalSize, - +fixedHeight?: boolean, }; function Modal(props: Props): React.Node { - const { size = 'small', children, onClose, fixedHeight = true, name } = props; + const { size = 'small', children, onClose, name: title } = props; const overlayRef = React.useRef(); const onBackgroundClick = React.useCallback( @@ -42,45 +41,31 @@ } }, []); - 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], - ); + return (
-
-
- - × - -

{name}

+
+
{title}
+
+
- {children}
+ {children}
); diff --git a/web/theme.css b/web/theme.css --- a/web/theme.css +++ b/web/theme.css @@ -138,4 +138,6 @@ --label-default-color: var(--shades-white-80); --subchannels-modal-color: var(--shades-black-60); --subchannels-modal-color-hover: var(--shades-white-100); + --modal-close-color: var(--shades-black-60); + --modal-close-color-hover: var(--shades-white-100); }