+
{title}
{subtitle}
@@ -95,6 +130,18 @@ let Modal = (({
{wrappedChildren}
{footer}
+ {resizable && (
+
+ )}
);
@@ -122,7 +169,10 @@ Modal.propTypes = {
progress: PropTypes.bool.describe('Passed to the confirm button.'),
customFooter: PropTypes.node.describe('used to fill any custom footer use case.'),
textModal: PropTypes.bool.describe('Used for modals that contain only text to pad the text.'),
+ resizable: PropTypes.bool.describe('If true, the modal will be resizable with handle in the bottom right corner'),
width: PropTypes.number.describe('custom width of modal.'),
+ minWidth: PropTypes.number.describe('minimum width of modal when resizing the width'),
+ maxWidth: PropTypes.number.describe('maximum width of modal when resizing the width'),
buttonsInCenter: PropTypes.bool.describe('If true, the buttons will appear in the center of the modal, instead of to the right. By default, the buttons appear on the right unless the modal contains no children, in which case they appear in the center.'),
};
diff --git a/src/components/Modal/Modal.scss b/src/components/Modal/Modal.scss
index e49cbd1b97..f8c4f03d06 100644
--- a/src/components/Modal/Modal.scss
+++ b/src/components/Modal/Modal.scss
@@ -18,6 +18,10 @@
overflow: hidden;
transition: width 0.5s cubic-bezier(1, 0, 0, 1);
+ &.noTransition {
+ transition: none;
+ }
+
> *:not(:first-child):not(:last-child) {
border-color: $borderGrey;
border-width: 0 0 1px 0;
@@ -99,3 +103,13 @@
}
@include modalKeyframes();
+
+.resizeHandle {
+ width: 32px;
+ height: 32px;
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ user-select: none;
+ cursor: ew-resize;
+}
diff --git a/src/dashboard/Data/Browser/AddColumnDialog.react.js b/src/dashboard/Data/Browser/AddColumnDialog.react.js
index 6b11c174b3..dab0bac832 100644
--- a/src/dashboard/Data/Browser/AddColumnDialog.react.js
+++ b/src/dashboard/Data/Browser/AddColumnDialog.react.js
@@ -194,6 +194,7 @@ export default class AddColumnDialog extends React.Component {
);
return (