Wizard: Deprecate Chip and ChipGroup components

`Chip` and `ChipGroup` components will be deprecated in PF6. This replaces them with recommended `Label` and `LabelGroup`.
This commit is contained in:
regexowl 2025-03-03 16:48:49 +01:00 committed by Klara Simickova
parent 9dc66ec1d0
commit 223a6a6780
5 changed files with 30 additions and 26 deletions

View file

@ -2,11 +2,11 @@ import React, { useEffect, useState } from 'react';
import {
Button,
Chip,
ChipGroup,
FormGroup,
HelperText,
HelperTextItem,
Label,
LabelGroup,
MenuToggle,
MenuToggleElement,
Select,
@ -174,13 +174,13 @@ const LanguagesDropDown = () => {
)}`}</HelperTextItem>
</HelperText>
)}
<ChipGroup numChips={5} className="pf-v5-u-mt-sm pf-v5-u-w-100">
<LabelGroup numLabels={5} className="pf-v5-u-mt-sm pf-v5-u-w-100">
{languages?.map((lang) => (
<Chip key={lang} onClick={(e) => handleRemoveLang(e, lang)}>
<Label key={lang} onClose={(e) => handleRemoveLang(e, lang)}>
{lang}
</Chip>
</Label>
))}
</ChipGroup>
</LabelGroup>
</FormGroup>
);
};