@salesforcedevs/dx-components 0.26.1 → 0.26.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dx-components",
3
- "version": "0.26.1",
3
+ "version": "0.26.2",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -29,5 +29,5 @@
29
29
  "@types/debounce": "^1.2.0",
30
30
  "@types/lodash.get": "^4.4.6"
31
31
  },
32
- "gitHead": "2a51ec546bb18ade7d60d2591d4402a5512d89a0"
32
+ "gitHead": "a51ec257e0bc853955267650e17c86e8a250ea16"
33
33
  }
@@ -49,8 +49,7 @@
49
49
  @media screen and (min-width: 768px) {
50
50
  .container {
51
51
  background-image: url("/assets/svg/podcast-subscription-clouds.svg");
52
- min-height: 242px;
53
- padding-top: 22px;
52
+ min-height: 230px;
54
53
  }
55
54
 
56
55
  .badges {
@@ -1,8 +1,10 @@
1
1
  import slackCta from "dx/slackCta";
2
2
  import { createRenderComponent } from "utils-internal/tests";
3
+ import SlackCtaTest from "test-components/slackCtaTest";
3
4
 
4
5
  const TAG = "dx-slack-cta";
5
6
  const render = createRenderComponent(TAG, slackCta);
7
+ const renderSlotted = createRenderComponent("dx-slack-cta-test", SlackCtaTest);
6
8
 
7
9
  describe(TAG, () => {
8
10
  it("renders the button linking to slack", () => {
@@ -14,7 +16,7 @@ describe(TAG, () => {
14
16
  });
15
17
 
16
18
  it("renders a button meeting all accesibilty requirements", () => {
17
- const element = render();
19
+ const element = renderSlotted();
18
20
  return expect(element).toBeAccessible();
19
21
  });
20
22
 
@@ -26,23 +28,9 @@ describe(TAG, () => {
26
28
  const header = element.shadowRoot
27
29
  .querySelectorAll(".container")
28
30
  .item(0);
29
- expect(header.textContent).toBe("Follow along with Slackfoobar");
31
+ expect(header.textContent).toBe("foobar");
30
32
 
31
33
  const slackBtn = element.shadowRoot.querySelectorAll(".button").item(0);
32
34
  return expect(slackBtn.textContent).toBe("foobar");
33
35
  });
34
-
35
- it("renders the header text correctly", () => {
36
- const element = render({
37
- headerText: "foobar"
38
- });
39
-
40
- const slackBtn = element.shadowRoot.querySelectorAll(".button").item(0);
41
- expect(slackBtn.textContent).toBe("Add to Slack");
42
-
43
- const header = element.shadowRoot
44
- .querySelectorAll(".container")
45
- .item(0);
46
- return expect(header.textContent).toBe("foobarAdd to Slack");
47
- });
48
36
  });
@@ -18,12 +18,21 @@
18
18
  .podcast {
19
19
  background-image: url("/assets/svg/slack-cta-podcast-background-left.svg"),
20
20
  url("/assets/svg/slack-cta-podcast-background-right.svg");
21
- background-position: 20% 25%, 80% 75%;
21
+ background-position: 20% 0%, 80% 100%;
22
+ padding-top: 20px;
23
+ margin-top: -20px;
24
+ padding-bottom: var(--dx-g-spacing-2xl);
25
+ margin-bottom: calc(var(--dx-g-spacing-2xl) * -1);
22
26
  }
23
27
 
24
28
  .dx-text-heading-4 {
25
29
  font-size: var(--dx-g-text-lg);
26
- max-width: 40%;
30
+ max-width: 370px;
31
+ }
32
+ @media screen and (max-width: 1000px) {
33
+ .podcast {
34
+ background-position: 10% 10%, 90% 100%;
35
+ }
27
36
  }
28
37
 
29
38
  @media screen and (max-width: 768px) {
@@ -31,11 +40,8 @@
31
40
  max-width: 28ex;
32
41
  font-size: var(--dx-g-text-lg);
33
42
  }
34
- }
35
43
 
36
- @media screen and (min-width: 768px) {
37
- .container {
38
- min-height: 242px;
39
- padding-top: 22px;
44
+ .podcast {
45
+ background-image: none;
40
46
  }
41
47
  }
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <div class={containerClass}>
3
- <h2 class="dx-text-heading-4">{headerText}</h2>
3
+ <h2 class="dx-text-heading-4"><slot></slot></h2>
4
4
 
5
5
  <dx-button
6
- size="large"
6
+ size="small"
7
7
  variant="secondary"
8
8
  icon-symbol="slack"
9
9
  icon-sprite="salesforcebrand"
@@ -17,9 +17,9 @@ export const Base = () => `
17
17
  ${createStyles()}
18
18
  <h2>Add to Slack</h2>
19
19
 
20
- <dx-slack-cta header-text="Get notified of new episodes with the new Salesforce Developers Slack app" background="podcast"></dx-slack-cta>
21
-
22
- <dx-slack-cta header-text="Get the latest Salesforce Developer posts exactly how you want." inner-text="Send posts to Slack" background="blog"></dx-slack-cta>
20
+ <dx-hr spacing="2xl"></dx-hr>
21
+ <dx-slack-cta background="podcast">Get notified of new episodes with the new Salesforce Developers Slack app</dx-slack-cta>
22
+ <dx-hr spacing="2xl"></dx-hr>
23
23
 
24
- <dx-slack-cta header-text="Get notified of new events with the new Salesforce Developers Slack app"></dx-slack-cta>
24
+ <dx-slack-cta inner-text="Send posts to Slack" >Get the latest Salesforce Developer posts exactly how you want.</dx-slack-cta>
25
25
  `;
@@ -3,7 +3,6 @@ import { SlackCtaBackgroundVariant } from "typings/custom";
3
3
  import cx from "classnames";
4
4
 
5
5
  export default class SlackAdd extends LightningElement {
6
- @api headerText?: string = "Follow along with Slack";
7
6
  @api innerText?: string = "Add to Slack";
8
7
  @api background?: SlackCtaBackgroundVariant;
9
8
 
@@ -0,0 +1,3 @@
1
+ <template>
2
+ <dx-slack-cta>test</dx-slack-cta>
3
+ </template>
@@ -0,0 +1,3 @@
1
+ import { LightningElement } from "lwc";
2
+
3
+ export default class SlackCtaTest extends LightningElement {}