Skip to content

feat: allow to set title and description for modal #307

@mshadowz

Description

@mshadowz

Describe the feature

Describe the bug
The module does not provide a way to set a title or description for the modal via the cookieControl config. Even when isModalForced: true, the modal opens but only displays the cookie list; there is no header or descriptive text. This makes it impossible to customize the modal content without overriding it entirely via slots.

To Reproduce
Steps to reproduce the behavior:

  1. Configure cookieControl in nuxt.config.ts with isModalForced: true and attempt to add modal: { title: 'My Title', description: 'My Description' }.
  2. Run the Nuxt 3 application.
  3. Open the modal; it only shows the list of cookies without any title or description.

Expected behavior
I would expect the module to support modal title and description via the config, similar to how the cookie bar supports name and description.

Additional context
Currently, the only way to add a title or description is by overriding the #modal slot in Vue, which is inconvenient and makes reusing the module harder. It would be helpful to support modal.title and modal.description in the configuration itself.

Additional information

  • Would you be willing to help implement this feature?

Final checks

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions