@salesforcedevs/dx-components 1.3.141 → 1.3.143
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.css +21 -0
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.html +21 -0
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.ts +12 -0
- package/src/modules/dx/featuresListHeader/featuresListHeader.css +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dx-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.143",
|
|
4
4
|
"description": "DX Lightning web components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"eventsourcemock": "^2.0.0",
|
|
41
41
|
"luxon": "^3.1.0"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "f065b31a8ffe11c4b057974cf753fd6ae35c736a"
|
|
44
44
|
}
|
|
@@ -374,6 +374,19 @@ a.image-container > img {
|
|
|
374
374
|
display: block;
|
|
375
375
|
}
|
|
376
376
|
|
|
377
|
+
/* BUTTONS */
|
|
378
|
+
|
|
379
|
+
.buttons {
|
|
380
|
+
display: flex;
|
|
381
|
+
padding-top: var(--item-spacing);
|
|
382
|
+
padding-bottom: var(--item-spacing);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
dx-button {
|
|
386
|
+
display: inline-block;
|
|
387
|
+
padding-right: var(--dx-g-spacing-lg);
|
|
388
|
+
}
|
|
389
|
+
|
|
377
390
|
/* AUTHORS */
|
|
378
391
|
|
|
379
392
|
.authors {
|
|
@@ -495,6 +508,14 @@ dx-image-and-label {
|
|
|
495
508
|
line-height: var(--dx-g-spacing-lg);
|
|
496
509
|
}
|
|
497
510
|
|
|
511
|
+
.buttons {
|
|
512
|
+
flex-direction: column;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
dx-button {
|
|
516
|
+
padding-bottom: var(--dx-g-spacing-sm);
|
|
517
|
+
}
|
|
518
|
+
|
|
498
519
|
.authors {
|
|
499
520
|
padding-top: 0;
|
|
500
521
|
}
|
|
@@ -50,6 +50,27 @@
|
|
|
50
50
|
</template>
|
|
51
51
|
</div>
|
|
52
52
|
<span class="body dx-text-body-1">{body}</span>
|
|
53
|
+
<div class="buttons" if:true={hasButtons}>
|
|
54
|
+
<dx-button
|
|
55
|
+
if:true={ctaPrimaryLabel}
|
|
56
|
+
href={ctaPrimaryHref}
|
|
57
|
+
icon-symbol={ctaPrimarySymbol}
|
|
58
|
+
target={ctaPrimaryTarget}
|
|
59
|
+
size="large"
|
|
60
|
+
>
|
|
61
|
+
{ctaPrimaryLabel}
|
|
62
|
+
</dx-button>
|
|
63
|
+
<dx-button
|
|
64
|
+
if:true={ctaSecondaryLabel}
|
|
65
|
+
href={ctaSecondaryHref}
|
|
66
|
+
variant="secondary"
|
|
67
|
+
icon-symbol={ctaSecondarySymbol}
|
|
68
|
+
target={ctaSecondaryTarget}
|
|
69
|
+
size="large"
|
|
70
|
+
>
|
|
71
|
+
{ctaSecondaryLabel}
|
|
72
|
+
</dx-button>
|
|
73
|
+
</div>
|
|
53
74
|
<div class="slot-container">
|
|
54
75
|
<slot onslotchange={onSlotChange}></slot>
|
|
55
76
|
</div>
|
|
@@ -11,6 +11,14 @@ export default class FeaturedContentHeader extends LightningElement {
|
|
|
11
11
|
@api label?: string | null = null;
|
|
12
12
|
@api labelAsPrimaryHeading: boolean = false;
|
|
13
13
|
@api body!: string;
|
|
14
|
+
@api ctaPrimaryLabel?: string;
|
|
15
|
+
@api ctaPrimaryHref?: string;
|
|
16
|
+
@api ctaPrimarySymbol?: string;
|
|
17
|
+
@api ctaPrimaryTarget?: string;
|
|
18
|
+
@api ctaSecondaryLabel?: string;
|
|
19
|
+
@api ctaSecondaryHref?: string;
|
|
20
|
+
@api ctaSecondarySymbol?: string;
|
|
21
|
+
@api ctaSecondaryTarget?: string;
|
|
14
22
|
@api imgSrc?: string;
|
|
15
23
|
@api imgAlt?: string = "Featured content image";
|
|
16
24
|
@api imgPlacement?: "inline" | "below" = "inline";
|
|
@@ -69,6 +77,10 @@ export default class FeaturedContentHeader extends LightningElement {
|
|
|
69
77
|
);
|
|
70
78
|
}
|
|
71
79
|
|
|
80
|
+
private get hasButtons() {
|
|
81
|
+
return this.ctaPrimaryLabel && this.ctaSecondaryLabel;
|
|
82
|
+
}
|
|
83
|
+
|
|
72
84
|
private get style() {
|
|
73
85
|
return cx(
|
|
74
86
|
this.backgroundImg &&
|