Skip to content

Fragments supporting dangerouslySetInnerHTML #1033

@felixsanz

Description

@felixsanz

Is your feature request related to a problem?

Currently seems like this is not possible:

// const icon = '<svg ...>'
<Fragment dangerouslySetInnerHTML={icon}></Fragment>
Type '{ dangerouslySetInnerHTML: string; }' is not assignable to type 'IntrinsicAttributes & { children?: any; }'.
  Property 'dangerouslySetInnerHTML' does not exist on type 'IntrinsicAttributes & { children?: any; }'.ts(2322)

Describe the solution you'd like

<Fragment> should accept dangerouslySetInnerHTML like other elements

Describe alternatives you've considered

Using spans everywhere

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions