Skip to content

Commit

Permalink
chore: update frame names to fetch icon groups from Figma
Browse files Browse the repository at this point in the history
"All icons" no longer exists. Two new groups added
  • Loading branch information
DSil committed May 22, 2024
1 parent 42505b4 commit 0507a2a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/orbit-components/config/fetchIcons.mts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ interface Images {
images: Record<string, string>;
}

const FILTERED_FRAMES = ["All icons", "Social Colored", "Social", "Navigation icons"];
const VALID_FRAMES = [
"[Main] Bold icons",
"[Main] Light icons",
"Social Colored",
"Social",
"Navigation icons",
];
const ICONS_ID = "wjYAT0sNBXtirEoyKgXUwr";
const FIGMA_FILE_URI = `https://api.figma.com/v1/files/${ICONS_ID}`;
const FIGMA_IMAGE_URI = `https://api.figma.com/v1/images/${ICONS_ID}`;
Expand Down Expand Up @@ -190,7 +196,7 @@ async function saveOrbitIcons(data: { name: string; svg: string; id: string }[])
const { components } = meta;

const nodes = components
.filter(c => FILTERED_FRAMES.includes(c.containing_frame.name))
.filter(c => VALID_FRAMES.includes(c.containing_frame.name))
.reduce((acc, c) => {
if (c.name.includes("size=") && !isCorrectSize(c.name)) return acc;

Expand Down

0 comments on commit 0507a2a

Please sign in to comment.