Skip to content

Commit

Permalink
feat(content-item): add shadow parts (#11814)
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin-Sorin-Nicolae committed May 23, 2024
1 parent 134c038 commit 1289b9e
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ class C4DContentItem extends StableSelectorMixin(LitElement) {
return html`
<div
?hidden="${!hasStatistic}"
class="${c4dPrefix}--content-item__statitics">
class="${c4dPrefix}--content-item__statitics"
part="statistics">
<slot name="statistics" @slotchange="${handleSlotChange}"></slot>
</div>
`;
Expand All @@ -111,7 +112,10 @@ class C4DContentItem extends StableSelectorMixin(LitElement) {
const { _hasMedia: hasMedia, _handleSlotChange: handleSlotChange } = this;

return html`
<div ?hidden="${!hasMedia}" class="${c4dPrefix}--content-item__media">
<div
?hidden="${!hasMedia}"
class="${c4dPrefix}--content-item__media"
part="media">
<slot name="media" @slotchange="${handleSlotChange}"></slot>
</div>
`;
Expand All @@ -131,7 +135,10 @@ class C4DContentItem extends StableSelectorMixin(LitElement) {
protected _renderFooter(): TemplateResult | string | void {
const { _hasFooter: hasFooter } = this;
return html`
<div ?hidden="${!hasFooter}" class="${prefix}--content-item__cta">
<div
?hidden="${!hasFooter}"
class="${prefix}--content-item__cta"
part="cta">
<slot name="footer" @slotchange="${this._handleSlotChange}"></slot>
</div>
`;
Expand All @@ -158,7 +165,7 @@ class C4DContentItem extends StableSelectorMixin(LitElement) {
});

return html`
<div class="${horizontalClass}">
<div class="${horizontalClass}" part="heading">
${this._renderStatistic()} ${this._renderMedia()}
<div>
<slot name="heading"></slot>
Expand Down

0 comments on commit 1289b9e

Please sign in to comment.