From 93f665ca51e0d95a117cc0f01c742412e38e4bf2 Mon Sep 17 00:00:00 2001 From: orest-s Date: Wed, 10 Jan 2024 17:04:32 +0200 Subject: [PATCH] fix: changed icon to solid triangle and added it to the list --- packages/react/scripts/buildIconTypes.js | 9 +++++---- packages/react/src/components/Accordion/Accordion.tsx | 6 +++--- .../react/src/components/Icon/icons/triangle-solid.svg | 1 + 3 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 packages/react/src/components/Icon/icons/triangle-solid.svg diff --git a/packages/react/scripts/buildIconTypes.js b/packages/react/scripts/buildIconTypes.js index 33a5d9441..056a7f9c5 100644 --- a/packages/react/scripts/buildIconTypes.js +++ b/packages/react/scripts/buildIconTypes.js @@ -16,7 +16,8 @@ const ICONS_WITH_DIRECTIONS = [ 'arrow-circle', 'chevron', 'chevron-double', - 'triangle' + 'triangle', + 'triangle-solid' ]; const DIRECTIONS = ['up', 'down', 'left', 'right']; @@ -36,7 +37,7 @@ for (const file of files) { const name = file.replace('.svg', ''); if (ICONS_WITH_DIRECTIONS.includes(name)) { - iconTypes.push(...DIRECTIONS.map(d => `${name}-${d}`)); + iconTypes.push(...DIRECTIONS.map((d) => `${name}-${d}`)); } else { iconTypes.push(name); } @@ -51,11 +52,11 @@ fs.writeFileSync( /** IconType represents each valid icon type. */ export type IconType = -${iconTypes.map(i => ` | '${i}'`).join('\n')}; +${iconTypes.map((i) => ` | '${i}'`).join('\n')}; /** iconTypes holds each valid icon type. */ export const iconTypes = [ -${iconTypes.map(i => ` '${i}'`).join(',\n')} +${iconTypes.map((i) => ` '${i}'`).join(',\n')} ]; `.trim() ); diff --git a/packages/react/src/components/Accordion/Accordion.tsx b/packages/react/src/components/Accordion/Accordion.tsx index 86baa5158..9b71dddba 100644 --- a/packages/react/src/components/Accordion/Accordion.tsx +++ b/packages/react/src/components/Accordion/Accordion.tsx @@ -84,7 +84,7 @@ const Accordion = ({ } return ( -
+
\ No newline at end of file