diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2019-02-15 17:52:52 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2019-03-06 11:30:42 +0100 |
commit | 79a32b89b9d41df6cb8f1f96980d2591a5ecb192 (patch) | |
tree | 3b800b0d0f827ab655dbc3cf356b5058b490bdf8 /server/sonar-web/src/main/js/components/controls/Modal.tsx | |
parent | 769d66fa99847e63cf5536f128b53a37e7a5a430 (diff) | |
download | sonarqube-79a32b89b9d41df6cb8f1f96980d2591a5ecb192.tar.gz sonarqube-79a32b89b9d41df6cb8f1f96980d2591a5ecb192.zip |
SONARCLOUD-380 Rework modal styling of SC and SQ
* Update modal-fields
* Update form-fields styling
* Update modal-fields usage in extensions
* Clean css
Diffstat (limited to 'server/sonar-web/src/main/js/components/controls/Modal.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/components/controls/Modal.tsx | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/server/sonar-web/src/main/js/components/controls/Modal.tsx b/server/sonar-web/src/main/js/components/controls/Modal.tsx index e3beac1109b..c250470f9af 100644 --- a/server/sonar-web/src/main/js/components/controls/Modal.tsx +++ b/server/sonar-web/src/main/js/components/controls/Modal.tsx @@ -20,15 +20,13 @@ import * as React from 'react'; import * as ReactModal from 'react-modal'; import * as classNames from 'classnames'; -import { isSonarCloud } from '../../helpers/system'; ReactModal.setAppElement('#content'); export interface ModalProps { children: React.ReactNode; - medium?: boolean; + size?: 'small' | 'medium' | 'large'; noBackdrop?: boolean; - large?: boolean; } type MandatoryProps = Pick<ReactModal.Props, 'contentLabel'>; @@ -38,16 +36,11 @@ type Props = Partial<ReactModal.Props> & MandatoryProps & ModalProps; export default function Modal(props: Props) { return ( <ReactModal - className={classNames( - 'modal', - { - sonarcloud: isSonarCloud() - }, - { - 'modal-medium': props.medium, - 'modal-large': props.large - } - )} + className={classNames('modal', { + 'modal-small': props.size === 'small', + 'modal-medium': props.size === 'medium', + 'modal-large': props.size === 'large' + })} isOpen={true} overlayClassName={classNames('modal-overlay', { 'modal-no-backdrop': props.noBackdrop })} {...props} |