Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
joepuzzo committed Dec 8, 2020
1 parent 13a4c62 commit 62d226c
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@
}</script><style>#root[hidden],
#docs-root[hidden] {
display: none !important;
}</style></head><body><div class="sb-nopreview sb-wrapper"><div class="sb-nopreview_main"><h1 class="sb-nopreview_heading sb-heading">No Preview</h1><p>Sorry, but you either have no stories or none are selected somehow.</p><ul><li>Please check the Storybook config.</li><li>Try reloading the page.</li></ul><p>If the problem persists, check the browser console, or the terminal you've run Storybook from.</p></div></div><div class="sb-errordisplay sb-wrapper"><pre id="error-message" class="sb-heading"></pre><pre class="sb-errordisplay_code"><code id="error-stack"></code></pre></div><div id="root"></div><div id="docs-root"></div><script src="runtime~main.7f5fbeaaecfcd563f7fd.bundle.js"></script><script src="vendors~main.7f5fbeaaecfcd563f7fd.bundle.js"></script><script src="main.7f5fbeaaecfcd563f7fd.bundle.js"></script></body></html>
}</style></head><body><div class="sb-nopreview sb-wrapper"><div class="sb-nopreview_main"><h1 class="sb-nopreview_heading sb-heading">No Preview</h1><p>Sorry, but you either have no stories or none are selected somehow.</p><ul><li>Please check the Storybook config.</li><li>Try reloading the page.</li></ul><p>If the problem persists, check the browser console, or the terminal you've run Storybook from.</p></div></div><div class="sb-errordisplay sb-wrapper"><pre id="error-message" class="sb-heading"></pre><pre class="sb-errordisplay_code"><code id="error-stack"></code></pre></div><div id="root"></div><div id="docs-root"></div><script src="runtime~main.0c03f3a6e1ae561dec32.bundle.js"></script><script src="vendors~main.0c03f3a6e1ae561dec32.bundle.js"></script><script src="main.0c03f3a6e1ae561dec32.bundle.js"></script></body></html>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! For license information please see main.7f5fbeaaecfcd563f7fd.bundle.js.LICENSE.txt */
/*! For license information please see main.0c03f3a6e1ae561dec32.bundle.js.LICENSE.txt */
(window.webpackJsonp = window.webpackJsonp || []).push([
[0],
{
Expand Down Expand Up @@ -4437,6 +4437,7 @@
this.fieldsById.forEach(function(field) {
field.fieldApi.reset({ preventUpdate: !0 });
}),
this.emit('reset'),
this.emit('change');
}
},
Expand Down Expand Up @@ -4896,6 +4897,7 @@
getApi = _ref.getApi,
apiRef = _ref.apiRef,
onChange = _ref.onChange,
onReset = _ref.onReset,
onSubmit = _ref.onSubmit,
onValueChange = _ref.onValueChange,
onSubmitFailure = _ref.onSubmitFailure,
Expand All @@ -4914,6 +4916,7 @@
'getApi',
'apiRef',
'onChange',
'onReset',
'onSubmit',
'onValueChange',
'onSubmitFailure',
Expand Down Expand Up @@ -4977,6 +4980,9 @@
var onChangeHandler = function onChangeHandler() {
return onChange && onChange(formController.getFormState());
},
onResetHandler = function onResetHandler() {
return onReset && onReset();
},
onSubmitHandler = function onSubmitHandler() {
return (
onSubmit && onSubmit(formController.getFormState().values)
Expand All @@ -4996,18 +5002,20 @@
};
return (
formController.on('change', onChangeHandler),
formController.on('reset', onResetHandler),
formController.on('submit', onSubmitHandler),
formController.on('value', onValueHandler),
formController.on('failure', onFailureHandler),
function() {
formController.removeListener('change', onChangeHandler),
formController.removeListener('reset', onResetHandler),
formController.removeListener('submit', onSubmitHandler),
formController.removeListener('value', onValueHandler),
formController.removeListener('failure', onFailureHandler);
}
);
},
[onChange, onSubmit, onValueChange, onSubmitFailure]
[onChange, onReset, onSubmit, onValueChange, onSubmitFailure]
),
Object(react.useState)(function() {
formController.on('change', function onChangeHandlerRerender() {
Expand Down Expand Up @@ -8872,7 +8880,7 @@
};
},
487: function(module) {
module.exports = JSON.parse('{"a":"3.24.4"}');
module.exports = JSON.parse('{"a":"3.25.0"}');
},
488: function(module, __webpack_exports__, __webpack_require__) {
'use strict';
Expand Down Expand Up @@ -12370,7 +12378,7 @@
__webpack_require__(0);
var storybook_readme = __webpack_require__(87);
__webpack_exports__.a = Object(storybook_readme.doc)(
'# Form Props\n\n`Informed`s Form element can take many props. Below is table that defines what\nprops are available and what they do.\n\n| Name | Type | Description |\n| ------------------ | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| children | node OR func | A function that is given the form api and form state as props parameter FAAC ( Function As A Child ). Or normal JSX children |\n| component | node | A React component that is given the `formApi` and `formState` as props |\n| render | func | A render function that is given the `formApi` and `formState` as props |\n| onSubmit | func | A function that gets called when form is submitted successfully. The function receives the values as a parameter |\n| initialValues | obj | Use this if you want to populate the form with initial values. |\n| onChange | func | Function that gets called when form updates. Function receives the formState as a parameter. |\n| onValueChange | func | Function that gets called when forms values change. Function receives the values as a parameter. |\n| dontPreventDefault | bool | The default is to always "preventDefault" when a form submits. Pass this to disable "preventingDefault". You would, for example, pass this in when you want to use a good old form submission using action="/foo.php" on your form. |\n| getApi | func | To retrieve the form api as a callback, you can pass a function to the `getApi` prop. Your function will be called with the formApi as the only parameter. You can save this as a reference to easily manipulate your form from outside of the form scope. Note: this is no different then using a ref in react ( same principle ). |\n| onSubmitFailure | func | Function that gets called when submission fails due to errors. Function will receive the errors. |\n| validate | func | Function that gets called when form is attempting to submit. Function accepts the values as a parameter and must return either an error or undefined. |\n| validateFields | func | Function that gets called when form is attempting to submit. Function accepts the values as a parameter and must return an object where the key is the field and the value is an error or undefined |\n| validationSchema | yup schema | A yup schema to perform validation |\n| allowEmptyStrings | bool | Enable empty strings in the form values ( by default when you backspace everything in a text field it will remove the value from the values ) |\n| preventEnter | bool | Prevents the enter key from submitting the form |\n'
'# Form Props\n\n`Informed`s Form element can take many props. Below is table that defines what\nprops are available and what they do.\n\n| Name | Type | Description |\n| ------------------ | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| children | node OR func | A function that is given the form api and form state as props parameter FAAC ( Function As A Child ). Or normal JSX children |\n| component | node | A React component that is given the `formApi` and `formState` as props |\n| render | func | A render function that is given the `formApi` and `formState` as props |\n| onSubmit | func | A function that gets called when form is submitted successfully. The function receives the values as a parameter |\n| initialValues | obj | Use this if you want to populate the form with initial values. |\n| onChange | func | Function that gets called when form updates. Function receives the formState as a parameter. |\n| onValueChange | func | Function that gets called when forms values change. Function receives the values as a parameter. |\n| dontPreventDefault | bool | The default is to always "preventDefault" when a form submits. Pass this to disable "preventingDefault". You would, for example, pass this in when you want to use a good old form submission using action="/foo.php" on your form. |\n| getApi | func | To retrieve the form api as a callback, you can pass a function to the `getApi` prop. Your function will be called with the formApi as the only parameter. You can save this as a reference to easily manipulate your form from outside of the form scope. Note: this is no different then using a ref in react ( same principle ). |\n| onSubmitFailure | func | Function that gets called when submission fails due to errors. Function will receive the errors. |\n| validate | func | Function that gets called when form is attempting to submit. Function accepts the values as a parameter and must return either an error or undefined. |\n| validateFields | func | Function that gets called when form is attempting to submit. Function accepts the values as a parameter and must return an object where the key is the field and the value is an error or undefined |\n| validationSchema | yup schema | A yup schema to perform validation |\n| allowEmptyStrings | bool | Enable empty strings in the form values ( by default when you backspace everything in a text field it will remove the value from the values ) |\n| preventEnter | bool | Prevents the enter key from submitting the form |\n| onReset | func | Function that gets called when form is reset.'
);
},
518: function(module, __webpack_exports__, __webpack_require__) {
Expand Down Expand Up @@ -17800,4 +17808,4 @@
},
[[539, 1, 2]]
]);
//# sourceMappingURL=main.7f5fbeaaecfcd563f7fd.bundle.js.map
//# sourceMappingURL=main.0c03f3a6e1ae561dec32.bundle.js.map
1 change: 1 addition & 0 deletions docs/main.0c03f3a6e1ae561dec32.bundle.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/main.7f5fbeaaecfcd563f7fd.bundle.js.map

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/runtime~main.0c03f3a6e1ae561dec32.bundle.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/runtime~main.7f5fbeaaecfcd563f7fd.bundle.js.map

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! For license information please see vendors~main.7f5fbeaaecfcd563f7fd.bundle.js.LICENSE.txt */
/*! For license information please see vendors~main.0c03f3a6e1ae561dec32.bundle.js.LICENSE.txt */
(window.webpackJsonp = window.webpackJsonp || []).push([
[2],
[
Expand Down Expand Up @@ -114772,4 +114772,4 @@
}
]
]);
//# sourceMappingURL=vendors~main.7f5fbeaaecfcd563f7fd.bundle.js.map
//# sourceMappingURL=vendors~main.0c03f3a6e1ae561dec32.bundle.js.map
1 change: 1 addition & 0 deletions docs/vendors~main.0c03f3a6e1ae561dec32.bundle.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/vendors~main.7f5fbeaaecfcd563f7fd.bundle.js.map

This file was deleted.

0 comments on commit 62d226c

Please sign in to comment.