Skip to content

Include svg elements in React.Basic.DOM #82

Closed
@kryft

Description

@kryft

I wanted to render an svg using purescript-react-basic, and I noticed that the svg elements seemed to be missing from React.Basic.DOM. It looks like codegen only maps over props.elements.html, but the svg elements (apart from the svg tag itself) are under props.elements.svg (according to https://www.npmjs.com/package/react-html-attributes ). I'm only learning purescript and purescript-react-basic, so I could be missing something, but it seems like it would be relatively straightforward to include all the svg elements as well. I could try to make a PR for this if it's as simple as mapping over props.elements.svg as well.

I'm also wondering if Props_svg is correct? https://github.com/lumihq/purescript-react-basic/blob/master/src/React/Basic/DOM/Generated.purs#L1542 Some of the attributes look like they shouldn't be valid for the svg tag itself, but I'm not sure (maybe the spec allows having them even if they don't do anything).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions