Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Commit

Permalink
fix(pick-list, value-list): Fix icon for selected circle #911
Browse files Browse the repository at this point in the history
  • Loading branch information
driskull authored Apr 2, 2020
1 parent 94476e9 commit 167e729
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
10 changes: 2 additions & 8 deletions src/components/calcite-pick-list-item/calcite-pick-list-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,17 +231,11 @@ export class CalcitePickListItem {
}

const iconName =
icon === ICON_TYPES.square
? selected
? ICONS.checked
: ICONS.unchecked
: selected
? ICONS.selected
: ICONS.unselected;
icon === ICON_TYPES.circle ? ICONS.circle : selected ? ICONS.checked : ICONS.unchecked;

return (
<span class={CSS.icon}>
<calcite-icon scale="s" icon={iconName} />
<calcite-icon filled={iconName === ICONS.circle && selected} scale="s" icon={iconName} />
</span>
);
}
Expand Down
3 changes: 1 addition & 2 deletions src/components/calcite-pick-list-item/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ export const CSS = {
export const ICONS = {
unchecked: "square",
checked: "check",
selected: "circle-filled",
unselected: "circle",
circle: "circle",
remove: "x"
};

Expand Down

0 comments on commit 167e729

Please sign in to comment.