mirror of
https://github.com/feathericons/feather.git
synced 2023-08-10 21:13:24 +03:00
Fix viewBox
in icon.js
`<i data-feather="user" width="30" height="30"></i>` replace to `<svg ... width="30" height="30" viewBox="0 0 24 24" ...`, after fix: `<svg ... width="30" height="30" viewBox="0 0 30 30" ...`
This commit is contained in:
parent
734f3f5114
commit
4a0dc06be7
@ -19,6 +19,9 @@ class Icon {
|
||||
* @returns {string}
|
||||
*/
|
||||
toSvg(attrs = {}) {
|
||||
if (attrs.width || attrs.height) {
|
||||
attrs.viewBox = `0 0 ${attrs.width || this.attrs.width} ${attrs.height || this.attrs.height}`;
|
||||
}
|
||||
const combinedAttrs = {
|
||||
...this.attrs,
|
||||
...attrs,
|
||||
|
Loading…
Reference in New Issue
Block a user