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:
parent
9dc66ec1d0
commit
223a6a6780
5 changed files with 30 additions and 26 deletions
|
|
@ -2,10 +2,10 @@ import React, { useState } from 'react';
|
|||
|
||||
import {
|
||||
Button,
|
||||
Chip,
|
||||
ChipGroup,
|
||||
HelperText,
|
||||
HelperTextItem,
|
||||
Label,
|
||||
LabelGroup,
|
||||
TextInputGroup,
|
||||
TextInputGroupMain,
|
||||
TextInputGroupUtilities,
|
||||
|
|
@ -126,25 +126,29 @@ const ChippingInput = ({
|
|||
</HelperText>
|
||||
)}
|
||||
{requiredList && requiredList.length > 0 && (
|
||||
<ChipGroup
|
||||
<LabelGroup
|
||||
categoryName="Required by OpenSCAP"
|
||||
numChips={20}
|
||||
numLabels={20}
|
||||
className="pf-v5-u-mt-sm pf-v5-u-w-100"
|
||||
>
|
||||
{requiredList.map((item) => (
|
||||
<Chip key={item} isReadOnly>
|
||||
<Label key={item} isCompact>
|
||||
{item}
|
||||
</Chip>
|
||||
</Label>
|
||||
))}
|
||||
</ChipGroup>
|
||||
</LabelGroup>
|
||||
)}
|
||||
<ChipGroup numChips={20} className="pf-v5-u-mt-sm pf-v5-u-w-100">
|
||||
<LabelGroup numLabels={20} className="pf-v5-u-mt-sm pf-v5-u-w-100">
|
||||
{list?.map((item) => (
|
||||
<Chip key={item} onClick={(e) => handleRemoveItem(e, item)}>
|
||||
<Label
|
||||
key={item}
|
||||
isCompact
|
||||
onClose={(e) => handleRemoveItem(e, item)}
|
||||
>
|
||||
{item}
|
||||
</Chip>
|
||||
</Label>
|
||||
))}
|
||||
</ChipGroup>
|
||||
</LabelGroup>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue