Skip to content

Setting Array to the 'classes' prop leads to types mismatch error #62

@agantelin

Description

@agantelin

Describe the bug
As stated in the documentation (https://kyvg.github.io/vue3-notification/api/#props) the 'classes' prop can receive String or Array types. But in fact Array leads to types mismatch error:

[Vue warn]: Invalid prop: type check failed for prop "classes". Expected String with value "vue-notification,n-light", got Array

To Reproduce
Set the prop 'classes' to any array of strings:
<NuxtNotifications :classes="['vue-notification', 'n-light']" />

Expected behavior
Setting prop 'classes' to array of strings should adds all the classes listed in this array.

Additional context
There is the workaround: setting a list of classes separated by spaces.
<NuxtNotifications classes="vue-notification n-light" />
But this is not an Array type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions