Skip to content

Commit 2b8b0d2

Browse files
committed
feat(CC): pointed icons to react-icons
1 parent a9dfa5d commit 2b8b0d2

File tree

219 files changed

+1083
-5659
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+1083
-5659
lines changed

packages/react-core/codeConnect/scripts/iconConnector.mjs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ function extractIconNames(importStatement) {
2020

2121
// Extract icons between { }
2222
const matchIcons = cleanImport.match(/{\s*(.+?)\s*}/);
23+
2324
if (!matchIcons) {
2425
return [];
2526
}
@@ -56,10 +57,11 @@ async function generateIconConnections() {
5657

5758
// Resolve the output file path using existing configuration
5859
const connectionFilePath = path.resolve(config.iconsFigmaDir, config.figmaOutputFile);
60+
console.log(connectionFilePath);
5961

6062
// Read the current icon connection file
6163
const existingContent = await fs.readFile(connectionFilePath, 'utf8').catch(
62-
() => `import React from "react";
64+
() => `
6365
import {
6466
AddCircleOIcon, AngleDoubleLeftIcon, AngleDoubleRightIcon, AngleDownIcon
6567
} from "./generated";
@@ -78,10 +80,10 @@ import figma from "@figma/code-connect";
7880
// Generate import statement
7981
const importStatement = `import {
8082
${uniqueIconNames.join(', ')}
81-
} from "./generated";`;
83+
} from "./@patternfly/react-icons";`;
8284

8385
// Generate connection content
84-
const connectionContent = `import React from "react";
86+
const connectionContent = `
8587
${importStatement}
8688
import figma from "@figma/code-connect";
8789

packages/react-core/icons/generated/add-circle-o-icon.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

packages/react-core/icons/generated/angle-double-left-icon.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

packages/react-core/icons/generated/angle-double-right-icon.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

packages/react-core/icons/generated/angle-down-icon.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

packages/react-core/icons/generated/angle-left-icon.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

packages/react-core/icons/generated/angle-right-icon.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

packages/react-core/icons/generated/angle-up-icon.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

packages/react-core/icons/generated/ansible-icon.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

packages/react-core/icons/generated/arrow-circle-down-icon.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)