@symply.io/basic-components 1.4.7-alpha.1 → 1.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BasicModal/index.js +1 -1
- package/README.md +1 -0
- package/package.json +1 -1
package/BasicModal/index.js
CHANGED
@@ -78,7 +78,7 @@ function BasicModal(props, ref) {
|
|
78
78
|
var _this = this;
|
79
79
|
var desc = props.desc, title = props.title, loading = props.loading, buttons = props.buttons, _a = props.open, open = _a === void 0 ? false : _a, _b = props.noForm, noForm = _b === void 0 ? false : _b, children = props.children, disabled = props.disabled, _c = props.maxWidth, maxWidth = _c === void 0 ? "sm" : _c, _d = props.color, color = _d === void 0 ? "primary" : _d, _e = props.submitText, submitText = _e === void 0 ? "Save" : _e, _f = props.cancelText, cancelText = _f === void 0 ? "Cancel" : _f, _g = props.hideBottomButtons, hideBottomButtons = _g === void 0 ? false : _g, _h = props.showTopRightCloseButton, showTopRightCloseButton = _h === void 0 ? false : _h, onClose = props.onClose, onSubmit = props.onSubmit, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, rest = __rest(props, ["desc", "title", "loading", "buttons", "open", "noForm", "children", "disabled", "maxWidth", "color", "submitText", "cancelText", "hideBottomButtons", "showTopRightCloseButton", "onClose", "onSubmit", "primaryColor", "secondaryColor"]);
|
80
80
|
if (!noForm && !buttons && !onSubmit) {
|
81
|
-
throw new Error("Error from @symply.io/basic-components/BasicModal: `onSubmit` is required when there are no custom buttons and `noForm` is
|
81
|
+
throw new Error("Error from @symply.io/basic-components/BasicModal: `onSubmit` is required when there are no custom buttons and `noForm` is false.");
|
82
82
|
}
|
83
83
|
var formRef = useRef(null);
|
84
84
|
var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
|
package/README.md
CHANGED
@@ -202,6 +202,7 @@ import BasicModal from '@symply.io/basic-components/BasicModal';
|
|
202
202
|
| onClose | func | | true | Callback fired when the cancel button requests to be clicked.<br />**Signature:**<br/>`function() => void` |
|
203
203
|
| onSubmit | func | | true | Callback fired when the submit button requests to be clicked.<br />**Signature:**<br/>`function() => void` |
|
204
204
|
| open | bool | false | true | If `true`, the component is shown. |
|
205
|
+
| ref | ref | | false | You can get the form "onSubmit" function from the ref. |
|
205
206
|
| scroll | 'body' \| 'paper' | 'paper' | false | Determine the container for scrolling the dialog. |
|
206
207
|
| showTopRightCloseButton | bool | false | false | If `true`, show a close icon button at the top right of the modal. |
|
207
208
|
| submitText | string | ‘Save’ | false | The text of the submit button. |
|