fix: removing unsupported modal sizes (#10625)

* fix: removing unsupported modal sizes

* linting!

* NOT specifying bsSize seems to have the same effect as (unsupported) "medium"

* supporting 'large' and 'small' over 'lg' and 'sm'
This commit is contained in:
Evan Rusackas 2020-08-18 14:33:39 -07:00 committed by GitHub
parent ca5dc4256f
commit 844b471509
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 6 additions and 10 deletions

View File

@ -95,7 +95,6 @@ class EstimateQueryCostButton extends React.PureComponent {
<i className="fa fa-clock-o" /> {btnText}
</Button>
}
bsSize="medium"
/>
</span>
);

View File

@ -201,7 +201,6 @@ class ScheduleQueryButton extends React.PureComponent {
<i className="fa fa-calendar" /> {t('Schedule')}
</Button>
}
bsSize="medium"
/>
</span>
);

View File

@ -63,7 +63,6 @@ export default function DeleteModal({
primaryButtonType="danger"
show={open}
title={title}
bsSize="medium"
>
<DescriptionContainer>{description}</DescriptionContainer>
<StyleFormGroup>

View File

@ -31,7 +31,7 @@ interface ModalProps {
primaryButtonType?: 'primary' | 'danger';
show: boolean;
title: React.ReactNode;
bsSize?: 'xs' | 'xsmall' | 'sm' | 'small' | 'medium' | 'lg' | 'large';
bsSize?: 'small' | 'large'; // react-bootstrap also supports 'sm', 'lg' but we're keeping it simple.
}
const StyledModal = styled(BaseModal)`
@ -75,10 +75,9 @@ export default function Modal({
primaryButtonType = 'primary',
show,
title,
bsSize = 'lg',
}: ModalProps) {
return (
<StyledModal show={show} onHide={onHide} bsSize={bsSize}>
<StyledModal show={show} onHide={onHide}>
<BaseModal.Header closeButton>
<BaseModal.Title>
<Title>{title}</Title>

View File

@ -34,7 +34,7 @@ const propTypes = {
onExit: PropTypes.func,
isButton: PropTypes.bool,
isMenuItem: PropTypes.bool,
bsSize: PropTypes.string,
bsSize: PropTypes.oneOf(['large', 'small']), // react-bootstrap also supports 'sm', 'lg' but we're keeping it simple.
className: PropTypes.string,
tooltip: PropTypes.string,
backdrop: PropTypes.oneOf(['static', true, false]),

View File

@ -120,7 +120,7 @@ const ChangeDatasourceModal: FunctionComponent<ChangeDatasourceModalProps> = ({
};
return (
<Modal show={show} onHide={onHide} onEnter={onEnterModal} bsSize="lg">
<Modal show={show} onHide={onHide} onEnter={onEnterModal} bsSize="large">
<Modal.Header closeButton>
<Modal.Title>{t('Select a datasource')}</Modal.Title>
</Modal.Header>

View File

@ -110,7 +110,7 @@ const DatasourceModal: FunctionComponent<DatasourceModalProps> = ({
};
return (
<Modal show={show} onHide={onHide} bsSize="lg">
<Modal show={show} onHide={onHide} bsSize="large">
<Modal.Header closeButton>
<Modal.Title>
<div>

View File

@ -213,7 +213,7 @@ export default class VizTypeControl extends React.PureComponent {
onHide={this.toggleModal}
onEnter={this.focusSearch}
onExit={this.setSearchRef}
bsSize="lg"
bsSize="large"
>
<Modal.Header closeButton>
<Modal.Title>{t('Select a visualization type')}</Modal.Title>