|
|
|
@ -12,7 +12,7 @@ npm install @tiny-components\sidebar-form --save
|
|
|
|
|
|
|
|
|
|
## How to use
|
|
|
|
|
|
|
|
|
|
There are Multiple Components to use this Form.
|
|
|
|
|
Create your own Component that will include a form. The Tiny Sidebar Form uses Slot.
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
<tiny-sidebar-form form-id="example-form" open={ state.isOpen } close={ () => { handleClose() }} loading={ state.isLoading }>
|
|
|
|
@ -34,3 +34,25 @@ There are Multiple Components to use this Form.
|
|
|
|
|
|
|
|
|
|
</tiny-sidebar-form>
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
You have to add the Mixin "sidebarFormMixin.js".
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
export default () => {
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
|
|
...sidebar, // adding basic funtion for sidebar
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Add Function to handle the submit.
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
handleSubmit(event) {
|
|
|
|
|
event.preventDefault()
|
|
|
|
|
|
|
|
|
|
this.state.isLoading = true
|
|
|
|
|
this.update()
|
|
|
|
|
...
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
You can find a full Example in src/ and a running version under example/.
|
|
|
|
|