Closed chekromul closed 2 months ago
"@busbud/tailwind-buddy": "^0.0.33"
import { VariantsProps, compose } from "@busbud/tailwind-buddy"; interface FooBaseProps { someProp?: string; } const fooVariants = compose({ slots: { root: "", }, variants: { size: { md: { root: "text-size-150" }, }, }, defaultVariants: { size: "md", }, responsiveVariants: [], })<FooBaseProps>(); type FooProps = VariantsProps<typeof fooVariants>; export interface BarProps extends FooProps {}
Here's the error:
TS2312: An interface can only extend an object type or intersection of object types with statically known members.
Its not something we do as we do need to type inside the variant definition the compound.
Thats the main difference with other libraries they don't support compound conditions with other props than the variants
Preconditions
"@busbud/tailwind-buddy": "^0.0.33"
Steps to reproduce
Actual result
Here's the error:
Screenshot