Skip to content

Incorrect compound button variants types #3738

Open
@MichailShcherbakov

Description

@MichailShcherbakov

Environment

Is this bug related to Nuxt or Vue?

Nuxt

Version

3.0.2

Reproduction

https://github.com/nuxt/ui/blob/v3/src/theme/button.ts

Description

I want to customize a button variant by size, trailing and square params. It works, but the types are broken.

The line in the compoundVariants:
{ size: 'md', trailing: true, square: false, class: { trailingIcon: '-mr-1' } }

Errors:
Type '{ trailingIcon: string; }' is not assignable to type 'string'

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriagev3#1289

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions