-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[angular-xmcloud] Introduce angular SXA Promo component (#1897)
Co-authored-by: Artem Alexeyenko <[email protected]>
- Loading branch information
1 parent
65b3004
commit 491f8e9
Showing
5 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...-sitecore-jss/src/templates/angular-xmcloud/src/app/components/promo/promo.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<div class="component promo {{ styles }}" [attr.id]="id"> | ||
<div class="component-content"> | ||
<ng-container *ngIf="rendering.fields; else empty"> | ||
<div class="field-promoicon"> | ||
<img *scImage="rendering.fields.PromoIcon" /> | ||
</div> | ||
<div class="promo-text"> | ||
<div> | ||
<div class="field-promotext"> | ||
<div *scRichText="rendering.fields.PromoText"></div> | ||
</div> | ||
</div> | ||
<div class="field-promolink"> | ||
<a *scLink="rendering.fields.PromoLink"></a> | ||
</div> | ||
</div> | ||
</ng-container> | ||
</div> | ||
</div> | ||
|
||
<ng-template #empty> | ||
<span className="is-empty-hint">Promo</span> | ||
</ng-template> |
8 changes: 8 additions & 0 deletions
8
...te-sitecore-jss/src/templates/angular-xmcloud/src/app/components/promo/promo.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Component } from '@angular/core'; | ||
import { SxaComponent } from '../sxa.component'; | ||
|
||
@Component({ | ||
selector: 'app-promo', | ||
templateUrl: './promo.component.html', | ||
}) | ||
export class PromoComponent extends SxaComponent {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters