UNPKG

@sjsf-lab/shadcn-extras-theme

Version:

The shadcn-svelte-extras based theme for svelte-jsonschema-form

25 lines (24 loc) 913 B
import type { Component } from 'svelte'; import type { WidgetCommonProps } from '@sjsf/form/fields/widgets'; import type { RatingGroupRootProps } from 'bits-ui'; import type { StarRatingStarProps } from '../../components/ui/star-rating/types.js'; declare module '@sjsf/form' { interface ComponentProps { shadcnExtrasStarRatingWidget: WidgetCommonProps<number>; } interface ComponentBindings { shadcnExtrasStarRatingWidget: 'value'; } interface UiOptions { shadcnExtrasStarRating?: RatingGroupRootProps; } } declare module '@sjsf/shadcn4-theme' { interface ThemeComponents { StarRatingRoot: Component<RatingGroupRootProps, {}, 'value'>; StarRatingStar: Component<StarRatingStarProps>; } } declare const StarRating: Component<WidgetCommonProps<number>, {}, "value">; type StarRating = ReturnType<typeof StarRating>; export default StarRating;