Ilko Kacharov
Ilko Kacharov
TTCTheo's Typesafe Cult
Created by unreal on 9/15/2023 in #questions
shadcn/ui variant typescript error
You can leverage the exported ButtonProps to use the variant types:
import { ButtonProps } from '@/components/ui/button'

type VariantTypes = ButtonProps['variant']
import { ButtonProps } from '@/components/ui/button'

type VariantTypes = ButtonProps['variant']
4 replies