formaat-design / reshaped

Community repository for storing examples, reporting issues and tracking roadmap
https://reshaped.so
98 stars 3 forks source link

[Feature Request] Chip component #152

Closed Madhavkabra closed 1 year ago

Madhavkabra commented 1 year ago

A chip component is a good way to display selected filters. Current work around to do the same is the following code:

` <MenuItem size='small' selected roundedCorners key={fieldKey}

<View direction='row' align='center' padding={[0, 3]}>

{`${fieldKey} ${ filterTypeAndValue[`${fieldKey}`].type } ${filterTypeAndValue[`${fieldKey}`].value}`}

<Actionable onClick={() => handleRemoveFilterFromChips(fieldKey)}

<Icon svg={} /> `

image

blvdmitry commented 1 year ago

Hey, thanks for the request. We actually even have it on the feature list. Current assumption was that Badge could be a good option for rendering selected items but Chips indeed usually have other use cases

blvdmitry commented 1 year ago

It's coming in the next release as a part of Badge component, which now supports an additional large size, onDismiss/onClick and icons on both sides image