Skip to content

Commit

Permalink
fix: changed icon to solid triangle and added it to the list
Browse files Browse the repository at this point in the history
  • Loading branch information
orest-s committed Jan 10, 2024
1 parent 5bee5e4 commit 93f665c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
9 changes: 5 additions & 4 deletions packages/react/scripts/buildIconTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const ICONS_WITH_DIRECTIONS = [
'arrow-circle',
'chevron',
'chevron-double',
'triangle'
'triangle',
'triangle-solid'
];
const DIRECTIONS = ['up', 'down', 'left', 'right'];

Expand All @@ -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);
}
Expand All @@ -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()
);
Expand Down
6 changes: 3 additions & 3 deletions packages/react/src/components/Accordion/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const Accordion = ({
}

return (
<div className="Accordion" {...props}>
<div className={'Accordion'} {...props}>
<ExpandCollapsePanel
id={panelElement.props.id || `${elementId}-panel`}
open={open}
Expand All @@ -93,8 +93,8 @@ const Accordion = ({
{...panelElement.props}
>
<PanelTrigger
iconCollapsed="triangle-right"
iconExpanded="triangle-down"
iconCollapsed="triangle-solid-right"
iconExpanded="triangle-solid-down"
className={classnames(
'Accordion__trigger',
(trigger.props as AccordionTriggerProps).className
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 93f665c

Please sign in to comment.