Skip to content

Commit ab3626b

Browse files
committed
chore: refine JSDoc for RangeWidget component and adjust type annotations
1 parent 4720587 commit ab3626b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/shadcn/src/RangeWidget/RangeWidget.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,12 @@ const allowedProps = [
2121

2222
/**
2323
* A range widget component that renders a slider for number input
24-
* @template T - The type of the form data
25-
* @template S - The type of the schema, extending StrictRJSFSchema
26-
* @template F - The type of the form context
2724
* @param {object} props - The widget properties
2825
* @param {number} props.value - The current value of the range
2926
* @param {boolean} props.readonly - Whether the widget is read-only
3027
* @param {boolean} props.disabled - Whether the widget is disabled
3128
* @param {object} props.options - Additional options for the widget
32-
* @param {S} props.schema - The JSON schema for this field
29+
* @param props.schema - The JSON schema for this field
3330
* @param {(value: any) => void} props.onChange - Callback for when the value changes
3431
* @param {string} props.label - The label for the range input
3532
* @param {string} props.id - The unique identifier for the widget
@@ -44,7 +41,7 @@ export default function RangeWidget<T = any, S extends StrictRJSFSchema = RJSFSc
4441
onChange,
4542
label,
4643
id,
47-
}: WidgetProps<T, S, F>) {
44+
}: WidgetProps<T, S, F>): JSX.Element {
4845
const _onChange = (value: number[]) => onChange(value[0]);
4946

5047
const sliderProps = { value, label, id, ...rangeSpec<S>(schema) };

0 commit comments

Comments
 (0)