Skip to content

Type error in app config compoundVariants #3579

@Anton-Plagemann

Description

@Anton-Plagemann

Environment

Is this bug related to Nuxt or Vue?

Nuxt

Version

v3.0.0

Reproduction

https://codesandbox.io/p/devbox/wonderful-violet-jrsqy9

Description

I get a type error when using an array of strings for the variant key inside of `compoundVariants´:

export default defineAppConfig({
  ui: {
    colors: {
      primary: "green",
      neutral: "slate",
    },
    select: {
      compoundVariants: [
        {
          color: "primary",
          variant: ["outline", "subtle"],
          class: "data-[state='open']:ring",
        },
      ],
    },
  },
});
app/app.config.ts:11:11 - error TS2322: Type 'string[]' is not assignable to type 'string'.

11           variant: ["outline", "subtle"],
             ~~~~~~~

It does work tho, so its only a type issue I think.

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv3#1289

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions