Skip to content

Props destructuring occurs before width and height #277

@DylanMerigaud

Description

@DylanMerigaud

🐛 Bug Report

When icon parameter is passed and that the svg has no width and height the {...props} occurs before the width="1em" height="1em"

To Reproduce

Convert a svg file with not width and height props

Expected behavior

{...props} to be after width="1em" height="1em"

Link to repl or repo (highly encouraged)

https://github.com/DylanMerigaud/Bug_svgr_icon

Run npx envinfo --system --binaries --npmPackages @svgr/core,@svgr/cli,@svgr/webpack,@svgr/rollup --markdown --clipboard

## System:
 - OS: Linux 4.4 Ubuntu 18.04.1 LTS (Bionic Beaver)
 - CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
 - Memory: 3.72 GB / 15.85 GB
 - Shell: 5.4.2 - /usr/bin/zsh
## Binaries:
 - Node: 10.15.0 - /usr/bin/node
 - Yarn: 1.13.0 - /usr/bin/yarn
 - npm: 6.7.0 - /usr/bin/npm
## npmPackages:
 - @svgr/cli: ^4.1.0 => 4.1.0

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions