Skip to content

Commit

Permalink
feat(chipGroup): add icon variations property in chip group component
Browse files Browse the repository at this point in the history
  • Loading branch information
anuradha9712 committed Sep 15, 2023
1 parent 9770c92 commit 53682f1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions core/components/atoms/chipGroup/ChipGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ export interface ChipGroupProps extends BaseProps {
* onClose?: (name: number | string | object) => void;
* onClick?: (name: number | string | object) => void;
* name: number | string | object;
* }
* iconVariations?: {
* fill?: number;
* weight?: number; Range: [100, 700]
* grade?: number; Range: [-25, 200]
* opticalSize?: number; Range: [20px, 48px]
* };
* }
* </pre>
*/
list: ChipProps[];
Expand All @@ -53,7 +59,7 @@ export const ChipGroup = (props: ChipGroupProps) => {
return (
<div data-test="DesignSystem-ChipGroup" {...baseProps} className={ChipGroupClass}>
{list.map((item, ind) => {
const { label = '', icon, type, disabled, selected, clearButton, name } = item;
const { label = '', icon, type, disabled, selected, clearButton, name, iconVariations } = item;
return (
<span key={ind} className="ChipGroup-item">
<Chip
Expand All @@ -64,6 +70,7 @@ export const ChipGroup = (props: ChipGroupProps) => {
icon={icon}
disabled={disabled}
clearButton={clearButton}
iconVariations={iconVariations}
type={type}
onClick={() => onClickHandler(item)}
onClose={() => onCloseHandler(item)}
Expand Down

0 comments on commit 53682f1

Please sign in to comment.