joe-bell / cva

Class Variance Authority
https://cva.style
Apache License 2.0
5.65k stars 109 forks source link

Required/Optional Variants don't allow for nesting #90

Closed lifeiscontent closed 1 year ago

lifeiscontent commented 1 year ago
import { cva } from 'class-variance-authority';

export const Button = cva(
  "default",
  {
    variants: {
      required: {
        Intent: {
            primary: "some",
            secondary: "thing",       
        },
      },
      optional: {},
    },
  },
);

in the docs, it says to use required and optional but it doesn't seem to work when you have nested objects like the example above.

joe-bell commented 1 year ago

Closing as this does not conform to the issue template