Modal buttons

How to use buttons on your modal

Add buttons to your modal

YourComponent.vue
<l-modal :name="'test'" :buttons="buttons">
    <template #title>
        Some title
    </template>
    <template #content>
        Some content
    </template>
</l-modal>

Create array with your buttons

YourComponent.vue
data() {
    return {
        buttons: [
            {
                text: 'Some btn text',
                title: 'Test button title',
                type: 'submit' or 'button',
                class: '**some-custom-class**',
                options: {
                    disabled: true,
                },
                click: () => {
                    **your action after click**
                }
            },
            {
                ...
            }
        ]
    }
}

Result buttons-result

Buttons arguments

ArgumentTypeDescription
textstringButton text
titlestringButton title
typestringButton type
classstringButton custom classes
clickfunction Button click handler,
optionsobject Button options(like disabled and etc),