UNPKG

@nuxtwind/components

Version:

Component Library for Nuxt 3 using TailwindCSS

67 lines (66 loc) 1.97 kB
import type { ButtonProps, BadgeProps, AppbarProps, CarouselProps, CheckboxProps, CheckboxgroupProps, DrawerProps, ProgressProps, SelectProps, SkeletonProps, SliderProps, TextareaProps, TextfieldProps, ToastProps, TooltipProps } from '../types/props.js'; import type { ButtonConfig, BadgeConfig, AppbarConfig, CarouselConfig, CheckboxConfig, CheckboxgroupConfig, DrawerConfig, ProgressConfig, SelectConfig, SkeletonConfig, SliderConfig, TextareaConfig, TextfieldConfig, ToastConfig, TooltipConfig } from '../types/merged.js'; interface ComponentTypeMap { button: { Props: ButtonProps; Config: ButtonConfig; }; badge: { Props: BadgeProps; Config: BadgeConfig; }; appbar: { Props: AppbarProps; Config: AppbarConfig; }; carousel: { Props: CarouselProps; Config: CarouselConfig; }; checkbox: { Props: CheckboxProps; Config: CheckboxConfig; }; checkboxgroup: { Props: CheckboxgroupProps; Config: CheckboxgroupConfig; }; drawer: { Props: DrawerProps; Config: DrawerConfig; }; progress: { Props: ProgressProps; Config: ProgressConfig; }; select: { Props: SelectProps; Config: SelectConfig; }; skeleton: { Props: SkeletonProps; Config: SkeletonConfig; }; slider: { Props: SliderProps; Config: SliderConfig; }; textarea: { Props: TextareaProps; Config: TextareaConfig; }; textfield: { Props: TextfieldProps; Config: TextfieldConfig; }; toast: { Props: ToastProps; Config: ToastConfig; }; tooltip: { Props: TooltipProps; Config: TooltipConfig; }; } export default function useComponentConfig<K extends keyof ComponentTypeMap>(componentName: K, props: ComponentTypeMap[K]['Props']): ComponentTypeMap[K]['Config']; export {};