Revert "fix: remove Icon default fill="currentColor"" (#50918)

This commit is contained in:
afc163 2024-09-19 17:47:15 +08:00 committed by GitHub
parent 1c4025fc12
commit 0815f2629e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 20 additions and 2 deletions

View File

@ -238,6 +238,7 @@ exports[`renders components/icon/demo/custom.tsx extend context correctly 1`] =
aria-hidden="true"
aria-label="home"
class="anticon anticon-home"
fill="currentColor"
focusable="false"
height="1em"
role="img"
@ -301,6 +302,7 @@ exports[`renders components/icon/demo/iconfont.tsx extend context correctly 1`]
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
@ -317,10 +319,12 @@ exports[`renders components/icon/demo/iconfont.tsx extend context correctly 1`]
<span
class="anticon"
role="img"
style="color: rgb(24, 119, 242);"
>
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
@ -341,6 +345,7 @@ exports[`renders components/icon/demo/iconfont.tsx extend context correctly 1`]
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
@ -370,6 +375,7 @@ exports[`renders components/icon/demo/scriptUrl.tsx extend context correctly 1`]
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
@ -390,6 +396,7 @@ exports[`renders components/icon/demo/scriptUrl.tsx extend context correctly 1`]
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
@ -410,6 +417,7 @@ exports[`renders components/icon/demo/scriptUrl.tsx extend context correctly 1`]
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
@ -430,6 +438,7 @@ exports[`renders components/icon/demo/scriptUrl.tsx extend context correctly 1`]
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"

View File

@ -236,6 +236,7 @@ exports[`renders components/icon/demo/custom.tsx correctly 1`] = `
aria-hidden="true"
aria-label="home"
class="anticon anticon-home"
fill="currentColor"
focusable="false"
height="1em"
role="img"
@ -297,6 +298,7 @@ exports[`renders components/icon/demo/iconfont.tsx correctly 1`] = `
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
@ -313,10 +315,12 @@ exports[`renders components/icon/demo/iconfont.tsx correctly 1`] = `
<span
class="anticon"
role="img"
style="color:#1877F2"
>
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
@ -337,6 +341,7 @@ exports[`renders components/icon/demo/iconfont.tsx correctly 1`] = `
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
@ -364,6 +369,7 @@ exports[`renders components/icon/demo/scriptUrl.tsx correctly 1`] = `
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
@ -384,6 +390,7 @@ exports[`renders components/icon/demo/scriptUrl.tsx correctly 1`] = `
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
@ -404,6 +411,7 @@ exports[`renders components/icon/demo/scriptUrl.tsx correctly 1`] = `
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"
@ -424,6 +432,7 @@ exports[`renders components/icon/demo/scriptUrl.tsx correctly 1`] = `
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
width="1em"

View File

@ -9,7 +9,7 @@ const IconFont = createFromIconfontCN({
const App: React.FC = () => (
<Space>
<IconFont type="icon-tuichu" />
<IconFont type="icon-facebook" />
<IconFont type="icon-facebook" style={{ color: '#1877F2' }} />
<IconFont type="icon-twitter" />
</Space>
);

View File

@ -104,7 +104,7 @@
"@ant-design/colors": "^7.1.0",
"@ant-design/cssinjs": "^1.21.1",
"@ant-design/cssinjs-utils": "^1.1.0",
"@ant-design/icons": "^5.5.0",
"@ant-design/icons": "^5.5.1",
"@ant-design/react-slick": "~1.1.2",
"@babel/runtime": "^7.25.6",
"@ctrl/tinycolor": "^3.6.1",