Skip to content

Commit 28b736b

Browse files
committed
🤝 Review
1 parent ed0915e commit 28b736b

File tree

2 files changed

+10
-17
lines changed

2 files changed

+10
-17
lines changed

src/Range.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import React, {
77
type ReactNode,
88
type ComponentProps
99
} from "react";
10-
import { assert, Equals } from "tsafe";
10+
import { assert, type Equals } from "tsafe";
1111
import { symToStr } from "tsafe/symToStr";
12-
import { CxArg } from "tss-react";
12+
import { type CxArg } from "tss-react";
1313
import { fr } from "./fr";
1414
import { cx } from "./tools/cx";
1515
import { useAnalyticsId } from "./tools/useAnalyticsId";
@@ -55,10 +55,7 @@ export type RangeProps = {
5555

5656
//https://main--ds-gouv.netlify.app/example/component/range/
5757
export namespace RangeProps {
58-
type NativeInputProps = DetailedHTMLProps<
59-
InputHTMLAttributes<HTMLInputElement>,
60-
HTMLInputElement
61-
>;
58+
type NativeInputProps = ComponentProps<"input">;
6259

6360
export type AsSingle = {
6461
double?: never;

src/SegmentedControl.tsx

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
import {
2-
CSSProperties,
3-
DetailedHTMLProps,
2+
type ComponentProps,
3+
type CSSProperties,
44
forwardRef,
5-
InputHTMLAttributes,
65
memo,
7-
ReactNode,
6+
type ReactNode,
87
useId
98
} from "react";
10-
import { assert, Equals } from "tsafe";
11-
import { fr, FrIconClassName, RiIconClassName } from "./fr";
9+
import { assert, type Equals } from "tsafe";
10+
import { fr, type FrIconClassName, type RiIconClassName } from "./fr";
1211
import React from "react";
13-
import { CxArg } from "tss-react";
12+
import { type CxArg } from "tss-react";
1413
import { cx } from "./tools/cx";
1514
import { useAnalyticsId } from "./tools/useAnalyticsId";
1615

@@ -64,10 +63,7 @@ export namespace SegmentedControlProps {
6463

6564
export type Segment = {
6665
label: ReactNode;
67-
nativeInputProps?: DetailedHTMLProps<
68-
InputHTMLAttributes<HTMLInputElement>,
69-
HTMLInputElement
70-
>;
66+
nativeInputProps?: ComponentProps<"input">;
7167
iconId?: FrIconClassName | RiIconClassName;
7268
};
7369

0 commit comments

Comments
 (0)