Skip to content

Commit 270d544

Browse files
authored
fix(LabelGroup): updated close icon (patternfly#11942)
* fix(LabelGroup): updated close icon * chore(LabelGroup): update snapshots * chore(labelgroup): update close button to use small size
1 parent bc7a242 commit 270d544

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

packages/react-core/src/components/Label/LabelGroup.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { css } from '@patternfly/react-styles';
55
import { Button } from '../Button';
66
import { Label } from './Label';
77
import { Tooltip, TooltipPosition } from '../Tooltip';
8-
import TimesCircleIcon from '@patternfly/react-icons/dist/esm/icons/times-circle-icon';
8+
import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';
99
import { fillTemplate } from '../../helpers';
1010
import { GenerateId } from '../../helpers/GenerateId/GenerateId';
1111

@@ -205,12 +205,12 @@ class LabelGroup extends Component<LabelGroupProps, LabelGroupState> {
205205
<div className={css(styles.labelGroupClose)}>
206206
<Button
207207
variant="plain"
208-
hasNoPadding
208+
size="sm"
209209
aria-label={closeBtnAriaLabel}
210210
onClick={onClick}
211211
id={`remove_group_${id}`}
212212
aria-labelledby={`remove_group_${id} ${id}`}
213-
icon={<TimesCircleIcon />}
213+
icon={<TimesIcon />}
214214
/>
215215
</div>
216216
);

packages/react-core/src/components/Label/__tests__/__snapshots__/LabelGroup.test.tsx.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ exports[`LabelGroup label group with closable category 1`] = `
255255
<button
256256
aria-label="Close label group"
257257
aria-labelledby="remove_group_generated-id generated-id"
258-
class="pf-v6-c-button pf-m-plain pf-m-no-padding"
258+
class="pf-v6-c-button pf-m-plain pf-m-small"
259259
data-ouia-component-id="OUIA-Generated-Button-plain-1"
260260
data-ouia-component-type="PF6/Button"
261261
data-ouia-safe="true"
@@ -271,11 +271,11 @@ exports[`LabelGroup label group with closable category 1`] = `
271271
fill="currentColor"
272272
height="1em"
273273
role="img"
274-
viewBox="0 0 512 512"
274+
viewBox="0 0 352 512"
275275
width="1em"
276276
>
277277
<path
278-
d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"
278+
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
279279
/>
280280
</svg>
281281
</span>

packages/react-core/src/components/Toolbar/__tests__/__snapshots__/Toolbar.test.tsx.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ exports[`Toolbar should render with custom label content 1`] = `
225225
<button
226226
aria-label="Close label group"
227227
aria-labelledby="remove_group_generated-id generated-id"
228-
class="pf-v6-c-button pf-m-plain pf-m-no-padding"
228+
class="pf-v6-c-button pf-m-plain pf-m-small"
229229
data-ouia-component-id="OUIA-Generated-Button-plain-4"
230230
data-ouia-component-type="PF6/Button"
231231
data-ouia-safe="true"
@@ -241,11 +241,11 @@ exports[`Toolbar should render with custom label content 1`] = `
241241
fill="currentColor"
242242
height="1em"
243243
role="img"
244-
viewBox="0 0 512 512"
244+
viewBox="0 0 352 512"
245245
width="1em"
246246
>
247247
<path
248-
d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"
248+
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
249249
/>
250250
</svg>
251251
</span>

0 commit comments

Comments
 (0)