@ons/design-system 53.0.0 → 53.0.1

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.
@@ -42,9 +42,13 @@
42
42
 
43
43
  {% if params.button is defined and params.button %}
44
44
  {% from "components/button/_macro.njk" import onsButton %}
45
+ {% set btnClasses = params.button.classes if params.button.classes is defined and params.button.classes else '' %}
46
+ {% if skinName == 'dark' %}
47
+ {% set btnClasses = btnClasses + ' ons-btn--ghost' %}
48
+ {% endif %}
45
49
  {{
46
50
  onsButton({
47
- "classes": params.button.classes if params.button.classes is defined and params.button.classes else '',
51
+ "classes": btnClasses,
48
52
  "type": 'button',
49
53
  "text": params.button.text,
50
54
  "url": params.button.url
@@ -158,6 +158,15 @@ describe('macro: hero', () => {
158
158
  expect(buttonSpy.occurrences[0]).toHaveProperty('text', 'Get started');
159
159
  expect(buttonSpy.occurrences[0]).toHaveProperty('url', '#0');
160
160
  });
161
+
162
+ it('outputs the correct button class with `dark` theme', () => {
163
+ const faker = templateFaker();
164
+ const buttonSpy = faker.spy('button');
165
+
166
+ faker.renderComponent('hero', { ...EXAMPLE_HERO_WITH_BUTTON, variants: 'dark' });
167
+
168
+ expect(buttonSpy.occurrences[0]).toHaveProperty('classes', ' ons-btn--ghost');
169
+ });
161
170
  });
162
171
 
163
172
  describe('mode: with pre-title image', () => {
@@ -157,6 +157,7 @@
157
157
  "phase": pageConfig.phase,
158
158
  "assetsURL": assetsURL,
159
159
  "serviceLinks": pageConfig.serviceLinks,
160
+ "noMasthead": pageConfig.header.noMasthead,
160
161
  "orgLogo": pageConfig.header.orgLogo,
161
162
  "orgMobileLogo": pageConfig.header.orgMobileLogo,
162
163
  "orgLogoAlt": pageConfig.header.orgLogoAlt,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ons/design-system",
3
3
  "description": "ONS Design System built CSS, JS, and Nunjucks templates",
4
- "version": "53.0.0",
4
+ "version": "53.0.1",
5
5
  "main": "index.js",
6
6
  "license": "MIT",
7
7
  "author": {