zillow / react-slider

Accessible, CSS agnostic, slider component for React.
https://zillow.github.io/react-slider
MIT License
883 stars 231 forks source link

[TypeScript] `renderThumb` #295

Closed m1nsuplee closed 11 months ago

m1nsuplee commented 1 year ago

Description

스크린샷 2023-06-21 오전 1 05 47

Passing 'props' to a component rendered by 'renderThumb' results in the following error:

Type '{ children: Element[]; ref: RefCallback<HTMLDivElement>; accept?: string | undefined; acceptCharset?: string | undefined; action?: string | undefined; ... 358 more ...; key: Key | ... 1 more ... | undefined; }' is not assignable to type 'DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>'.
  Type '{ children: Element[]; ref: RefCallback<HTMLDivElement>; accept?: string | undefined; acceptCharset?: string | undefined; action?: string | undefined; ... 358 more ...; key: Key | ... 1 more ... | undefined; }' is not assignable to type 'HTMLAttributes<HTMLDivElement>'.
    Types of property 'dangerouslySetInnerHTML' are incompatible.
      Type '{ __html: string | TrustedHTML; } | undefined' is not assignable to type '{ __html: string; } | undefined'.
        Type '{ __html: string | TrustedHTML; }' is not assignable to type '{ __html: string; }'.
          Types of property '__html' are incompatible.
            Type 'string | TrustedHTML' is not assignable to type 'string'.
              Type 'TrustedHTML' is not assignable to type 'string'.