mirror of
https://github.com/apache/superset.git
synced 2024-09-06 22:07:34 -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}
|
||||
</Button>
|
||||
}
|
||||
bsSize="medium"
|
||||
/>
|
||||
</span>
|
||||
);
|
||||
|
@ -201,7 +201,6 @@ class ScheduleQueryButton extends React.PureComponent {
|
||||
<i className="fa fa-calendar" /> {t('Schedule')}
|
||||
</Button>
|
||||
}
|
||||
bsSize="medium"
|
||||
/>
|
||||
</span>
|
||||
);
|
||||
|
@ -63,7 +63,6 @@ export default function DeleteModal({
|
||||
primaryButtonType="danger"
|
||||
show={open}
|
||||
title={title}
|
||||
bsSize="medium"
|
||||
>
|
||||
<DescriptionContainer>{description}</DescriptionContainer>
|
||||
<StyleFormGroup>
|
||||
|
@ -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>
|
||||
|
@ -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]),
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user