Skip to content

Commit

Permalink
feat(tag): add shadow parts
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin-Sorin-Nicolae committed Jul 12, 2024
1 parent e90d124 commit b406448
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/carbon-web-components/src/components/tag/tag.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2023
* Copyright IBM Corp. 2019, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
Expand All @@ -25,6 +25,8 @@ export { TAG_SIZE, TAG_TYPE };
*
* @fires cds-tag-beingclosed - The custom event fired as the element is being closed
* @fires cds-tag-closed - The custom event fired after the element has been closed
*
* @csspart close-icon - The close icon. Usage `cds-tag::part(close-icon)`
*/
@customElement(`${prefix}-tag`)
class CDSTag extends HostListenerMixin(FocusMixin(LitElement)) {
Expand Down Expand Up @@ -144,7 +146,10 @@ class CDSTag extends HostListenerMixin(FocusMixin(LitElement)) {
<slot name="slug" @slotchange="${handleSlugSlotChange}"></slot>
${filter
? html`
<button class="${prefix}--tag__close-icon" ?disabled=${disabled}>
<button
class="${prefix}--tag__close-icon"
part="close-icon"
?disabled=${disabled}>
${Close16({ 'aria-label': title })}
</button>
`
Expand Down

0 comments on commit b406448

Please sign in to comment.