mirror of
https://github.com/apache/superset.git
synced 2024-09-18 11:39:49 -04:00
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:
parent
ca5dc4256f
commit
844b471509
@ -95,7 +95,6 @@ class EstimateQueryCostButton extends React.PureComponent {
|
|||||||
<i className="fa fa-clock-o" /> {btnText}
|
<i className="fa fa-clock-o" /> {btnText}
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
bsSize="medium"
|
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
@ -201,7 +201,6 @@ class ScheduleQueryButton extends React.PureComponent {
|
|||||||
<i className="fa fa-calendar" /> {t('Schedule')}
|
<i className="fa fa-calendar" /> {t('Schedule')}
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
bsSize="medium"
|
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
@ -63,7 +63,6 @@ export default function DeleteModal({
|
|||||||
primaryButtonType="danger"
|
primaryButtonType="danger"
|
||||||
show={open}
|
show={open}
|
||||||
title={title}
|
title={title}
|
||||||
bsSize="medium"
|
|
||||||
>
|
>
|
||||||
<DescriptionContainer>{description}</DescriptionContainer>
|
<DescriptionContainer>{description}</DescriptionContainer>
|
||||||
<StyleFormGroup>
|
<StyleFormGroup>
|
||||||
|
@ -31,7 +31,7 @@ interface ModalProps {
|
|||||||
primaryButtonType?: 'primary' | 'danger';
|
primaryButtonType?: 'primary' | 'danger';
|
||||||
show: boolean;
|
show: boolean;
|
||||||
title: React.ReactNode;
|
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)`
|
const StyledModal = styled(BaseModal)`
|
||||||
@ -75,10 +75,9 @@ export default function Modal({
|
|||||||
primaryButtonType = 'primary',
|
primaryButtonType = 'primary',
|
||||||
show,
|
show,
|
||||||
title,
|
title,
|
||||||
bsSize = 'lg',
|
|
||||||
}: ModalProps) {
|
}: ModalProps) {
|
||||||
return (
|
return (
|
||||||
<StyledModal show={show} onHide={onHide} bsSize={bsSize}>
|
<StyledModal show={show} onHide={onHide}>
|
||||||
<BaseModal.Header closeButton>
|
<BaseModal.Header closeButton>
|
||||||
<BaseModal.Title>
|
<BaseModal.Title>
|
||||||
<Title>{title}</Title>
|
<Title>{title}</Title>
|
||||||
|
@ -34,7 +34,7 @@ const propTypes = {
|
|||||||
onExit: PropTypes.func,
|
onExit: PropTypes.func,
|
||||||
isButton: PropTypes.bool,
|
isButton: PropTypes.bool,
|
||||||
isMenuItem: 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,
|
className: PropTypes.string,
|
||||||
tooltip: PropTypes.string,
|
tooltip: PropTypes.string,
|
||||||
backdrop: PropTypes.oneOf(['static', true, false]),
|
backdrop: PropTypes.oneOf(['static', true, false]),
|
||||||
|
@ -120,7 +120,7 @@ const ChangeDatasourceModal: FunctionComponent<ChangeDatasourceModalProps> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal show={show} onHide={onHide} onEnter={onEnterModal} bsSize="lg">
|
<Modal show={show} onHide={onHide} onEnter={onEnterModal} bsSize="large">
|
||||||
<Modal.Header closeButton>
|
<Modal.Header closeButton>
|
||||||
<Modal.Title>{t('Select a datasource')}</Modal.Title>
|
<Modal.Title>{t('Select a datasource')}</Modal.Title>
|
||||||
</Modal.Header>
|
</Modal.Header>
|
||||||
|
@ -110,7 +110,7 @@ const DatasourceModal: FunctionComponent<DatasourceModalProps> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal show={show} onHide={onHide} bsSize="lg">
|
<Modal show={show} onHide={onHide} bsSize="large">
|
||||||
<Modal.Header closeButton>
|
<Modal.Header closeButton>
|
||||||
<Modal.Title>
|
<Modal.Title>
|
||||||
<div>
|
<div>
|
||||||
|
@ -213,7 +213,7 @@ export default class VizTypeControl extends React.PureComponent {
|
|||||||
onHide={this.toggleModal}
|
onHide={this.toggleModal}
|
||||||
onEnter={this.focusSearch}
|
onEnter={this.focusSearch}
|
||||||
onExit={this.setSearchRef}
|
onExit={this.setSearchRef}
|
||||||
bsSize="lg"
|
bsSize="large"
|
||||||
>
|
>
|
||||||
<Modal.Header closeButton>
|
<Modal.Header closeButton>
|
||||||
<Modal.Title>{t('Select a visualization type')}</Modal.Title>
|
<Modal.Title>{t('Select a visualization type')}</Modal.Title>
|
||||||
|
Loading…
Reference in New Issue
Block a user