Skip to content

Commit

Permalink
feat(copy): add shadow parts (#11920)
Browse files Browse the repository at this point in the history
* feat(copy): add shadow parts

* Update packages/carbon-web-components/src/components/copy/copy.ts

Co-authored-by: Matthew Oliveira <[email protected]>

* Update packages/carbon-web-components/src/components/copy/copy.ts

Co-authored-by: Matthew Oliveira <[email protected]>

* feat(copy): add shadow parts

---------

Co-authored-by: Matthew Oliveira <[email protected]>
  • Loading branch information
Valentin-Sorin-Nicolae and m4olivei committed Jul 12, 2024
1 parent b66e2c5 commit 81f0dcf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/carbon-web-components/src/components/copy/copy.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 @@ -17,6 +17,8 @@ import CDSIconButton from '../icon-button/icon-button';
* Copy.
*
* @element cds-copy
*
* @csspart tooltip-content - The content. Usage `cds-copy::part(tooltip-content)`
*/
@customElement(`${prefix}-copy`)
class CDSCopy extends CDSIconButton {
Expand Down Expand Up @@ -81,7 +83,7 @@ class CDSCopy extends CDSIconButton {
// eslint-disable-next-line class-methods-use-this
protected _renderTooltipContent() {
return html`
<cds-tooltip-content>
<cds-tooltip-content part="tooltip-content">
${this._showFeedback
? this.feedback
: html`<slot name="tooltip-content"></slot>`}
Expand Down

0 comments on commit 81f0dcf

Please sign in to comment.