Closed
Description
Description
In the file attributes-to-props.d.ts
the return types of attributesToProps
function is a Object
with String
items.
html-react-parser/lib/attributes-to-props.d.ts
Lines 3 to 4 in 80bbea0
But in the attributesToProps
function, setStyleProp
is call to transform CSSInline
to StyleObject
.
The return of the function is an StyleObject
and not a String
.
html-react-parser/lib/utilities.js
Lines 76 to 87 in 80bbea0
The result of this miss-typing is an error if you would like to get an CSSProperty
.
Expected Behavior
Update attributes-to-props.d.ts
with :
export type Attributes = Record<string, string>;
export type Props = Record<string, string> & {
style: Record<string, string>;
};