File tree Expand file tree Collapse file tree 2 files changed +10
-17
lines changed Expand file tree Collapse file tree 2 files changed +10
-17
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ import React, {
7
7
type ReactNode ,
8
8
type ComponentProps
9
9
} from "react" ;
10
- import { assert , Equals } from "tsafe" ;
10
+ import { assert , type Equals } from "tsafe" ;
11
11
import { symToStr } from "tsafe/symToStr" ;
12
- import { CxArg } from "tss-react" ;
12
+ import { type CxArg } from "tss-react" ;
13
13
import { fr } from "./fr" ;
14
14
import { cx } from "./tools/cx" ;
15
15
import { useAnalyticsId } from "./tools/useAnalyticsId" ;
@@ -55,10 +55,7 @@ export type RangeProps = {
55
55
56
56
//https://main--ds-gouv.netlify.app/example/component/range/
57
57
export namespace RangeProps {
58
- type NativeInputProps = DetailedHTMLProps <
59
- InputHTMLAttributes < HTMLInputElement > ,
60
- HTMLInputElement
61
- > ;
58
+ type NativeInputProps = ComponentProps < "input" > ;
62
59
63
60
export type AsSingle = {
64
61
double ?: never ;
Original file line number Diff line number Diff line change 1
1
import {
2
- CSSProperties ,
3
- DetailedHTMLProps ,
2
+ type ComponentProps ,
3
+ type CSSProperties ,
4
4
forwardRef ,
5
- InputHTMLAttributes ,
6
5
memo ,
7
- ReactNode ,
6
+ type ReactNode ,
8
7
useId
9
8
} 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" ;
12
11
import React from "react" ;
13
- import { CxArg } from "tss-react" ;
12
+ import { type CxArg } from "tss-react" ;
14
13
import { cx } from "./tools/cx" ;
15
14
import { useAnalyticsId } from "./tools/useAnalyticsId" ;
16
15
@@ -64,10 +63,7 @@ export namespace SegmentedControlProps {
64
63
65
64
export type Segment = {
66
65
label : ReactNode ;
67
- nativeInputProps ?: DetailedHTMLProps <
68
- InputHTMLAttributes < HTMLInputElement > ,
69
- HTMLInputElement
70
- > ;
66
+ nativeInputProps ?: ComponentProps < "input" > ;
71
67
iconId ?: FrIconClassName | RiIconClassName ;
72
68
} ;
73
69
You can’t perform that action at this time.
0 commit comments