Skip to content

Commit

Permalink
Revert "fix: <Icon component /> remove fill="currentColor"" (#672)
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 authored Sep 19, 2024
1 parent 91b7205 commit 8c992f3
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/icons-react/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export function normalizeTwoToneColors(
export const svgBaseProps = {
width: '1em',
height: '1em',
fill: 'currentColor',
'aria-hidden': 'true',
focusable: 'false',
};
Expand Down
29 changes: 29 additions & 0 deletions packages/icons-react/tests/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ exports[`Icon \`component\` prop can access to svg defs if has children 1`] = `
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand Down Expand Up @@ -582,13 +583,15 @@ exports[`Icon should support event listeners 2`] = `
<SvgComponent
aria-hidden="true"
className=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
>
<svg
aria-hidden="true"
className=""
fill="currentColor"
focusable="false"
height="1em"
viewBox="0 0 24 24"
Expand Down Expand Up @@ -625,13 +628,15 @@ exports[`Icon should support event listeners 3`] = `
<SvgComponent
aria-hidden="true"
className=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
>
<svg
aria-hidden="true"
className=""
fill="currentColor"
focusable="false"
height="1em"
viewBox="0 0 24 24"
Expand Down Expand Up @@ -667,6 +672,7 @@ exports[`Icon should support event listeners when passing svg paths as children
<svg
aria-hidden="true"
className=""
fill="currentColor"
focusable="false"
height="1em"
viewBox="0 0 24 24"
Expand All @@ -691,6 +697,7 @@ exports[`Icon should support pass svg paths as children 1`] = `
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
viewBox="0 0 24 24"
Expand All @@ -714,6 +721,7 @@ exports[`Icon should support svg react component 1`] = `
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
viewBox="0 0 24 24"
Expand Down Expand Up @@ -816,6 +824,7 @@ exports[`Icon.createFromIconfontCN() extraCommonProps should works fine and can
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand All @@ -832,6 +841,7 @@ exports[`Icon.createFromIconfontCN() extraCommonProps should works fine and can
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand All @@ -848,6 +858,7 @@ exports[`Icon.createFromIconfontCN() extraCommonProps should works fine and can
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand Down Expand Up @@ -879,6 +890,7 @@ exports[`Icon.createFromIconfontCN() should support event listeners 1`] = `
<svg
aria-hidden="true"
className=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand All @@ -903,6 +915,7 @@ exports[`Icon.createFromIconfontCN() should support event listeners 1`] = `
<svg
aria-hidden="true"
className=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand Down Expand Up @@ -930,6 +943,7 @@ exports[`Icon.createFromIconfontCN() should support event listeners 1`] = `
<svg
aria-hidden="true"
className=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand Down Expand Up @@ -959,6 +973,7 @@ exports[`Icon.createFromIconfontCN() should support event listeners 1`] = `
<svg
aria-hidden="true"
className="anticon-spin"
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand All @@ -984,6 +999,7 @@ exports[`Icon.createFromIconfontCN() should support iconfont.cn 1`] = `
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand All @@ -1000,6 +1016,7 @@ exports[`Icon.createFromIconfontCN() should support iconfont.cn 1`] = `
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand All @@ -1016,6 +1033,7 @@ exports[`Icon.createFromIconfontCN() should support iconfont.cn 1`] = `
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand All @@ -1039,6 +1057,7 @@ exports[`Icon.createFromIconfontCN({scriptUrl:[]}) extraCommonProps should works
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand All @@ -1055,6 +1074,7 @@ exports[`Icon.createFromIconfontCN({scriptUrl:[]}) extraCommonProps should works
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand All @@ -1071,6 +1091,7 @@ exports[`Icon.createFromIconfontCN({scriptUrl:[]}) extraCommonProps should works
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand Down Expand Up @@ -1125,6 +1146,7 @@ exports[`Icon.createFromIconfontCN({scriptUrl:[]}) should support event listener
<svg
aria-hidden="true"
className=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand All @@ -1149,6 +1171,7 @@ exports[`Icon.createFromIconfontCN({scriptUrl:[]}) should support event listener
<svg
aria-hidden="true"
className=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand Down Expand Up @@ -1176,6 +1199,7 @@ exports[`Icon.createFromIconfontCN({scriptUrl:[]}) should support event listener
<svg
aria-hidden="true"
className=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand Down Expand Up @@ -1205,6 +1229,7 @@ exports[`Icon.createFromIconfontCN({scriptUrl:[]}) should support event listener
<svg
aria-hidden="true"
className="anticon-spin"
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand All @@ -1230,6 +1255,7 @@ exports[`Icon.createFromIconfontCN({scriptUrl:[]}) should support iconfont.cn 1`
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand All @@ -1246,6 +1272,7 @@ exports[`Icon.createFromIconfontCN({scriptUrl:[]}) should support iconfont.cn 1`
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand All @@ -1262,6 +1289,7 @@ exports[`Icon.createFromIconfontCN({scriptUrl:[]}) should support iconfont.cn 1`
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand All @@ -1282,6 +1310,7 @@ exports[`Icon.createFromIconfontCN({scriptUrl:[]}) should support ignore load er
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
Expand Down

0 comments on commit 8c992f3

Please sign in to comment.