From ccf2a6f33a00a0774f4394aa3d8dd0059659c17b Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 19 Sep 2024 15:50:48 +0800 Subject: [PATCH 1/4] Revert "fix: remove fill="currentColor" (#670)" This reverts commit ddab19ea598d1112c7a9c2478688a8fef93309a1. --- packages/icons-react/package.json | 8 ++--- packages/icons-react/src/components/Icon.tsx | 2 +- packages/icons-react/src/utils.ts | 1 + .../tests/__snapshots__/index.test.tsx.snap | 29 +++++++++++++++++++ packages/icons-svg/{README.md => ReadMe.md} | 0 5 files changed, 35 insertions(+), 5 deletions(-) rename packages/icons-svg/{README.md => ReadMe.md} (100%) diff --git a/packages/icons-react/package.json b/packages/icons-react/package.json index 7d5c6926e..9987a9072 100644 --- a/packages/icons-react/package.json +++ b/packages/icons-react/package.json @@ -59,6 +59,8 @@ "glob": "^7.1.6", "history": "^4.9.0", "lodash": "^4.17.21", + "mobx": "^5.1.0", + "mobx-react": "^6.1.3", "pkg-dir": "4.0.0", "prettier": "^2.2.1", "rc-test": "^7.0.15", @@ -73,14 +75,12 @@ "react": ">=16.0.0", "react-dom": ">=16.0.0" }, - "resolutions": { - "cheerio": "1.0.0-rc.12" - }, "engines": { "node": ">=8" }, "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org" - } + }, + "gitHead": "225d4d2189720ee3b7e4a4d7a6d80e076fa15cbc" } diff --git a/packages/icons-react/src/components/Icon.tsx b/packages/icons-react/src/components/Icon.tsx index 9add0354d..99be72779 100644 --- a/packages/icons-react/src/components/Icon.tsx +++ b/packages/icons-react/src/components/Icon.tsx @@ -14,7 +14,7 @@ export interface IconBaseProps extends React.HTMLProps { export interface CustomIconComponentProps { width: string | number; height: string | number; - fill?: string; + fill: string; viewBox?: string; className?: string; style?: React.CSSProperties; diff --git a/packages/icons-react/src/utils.ts b/packages/icons-react/src/utils.ts index 917bd1049..dcee20e3a 100644 --- a/packages/icons-react/src/utils.ts +++ b/packages/icons-react/src/utils.ts @@ -92,6 +92,7 @@ export function normalizeTwoToneColors( export const svgBaseProps = { width: '1em', height: '1em', + fill: 'currentColor', 'aria-hidden': 'true', focusable: 'false', }; diff --git a/packages/icons-react/tests/__snapshots__/index.test.tsx.snap b/packages/icons-react/tests/__snapshots__/index.test.tsx.snap index 8c3b29661..52c8a3a8f 100644 --- a/packages/icons-react/tests/__snapshots__/index.test.tsx.snap +++ b/packages/icons-react/tests/__snapshots__/index.test.tsx.snap @@ -8,6 +8,7 @@ exports[`Icon \`component\` prop can access to svg defs if has children 1`] = `