@gympass/yoga 7.100.1 → 7.101.0

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.
@@ -99,10 +99,12 @@ Heading.propTypes = {
99
99
  import_prop_types.default.arrayOf(import_prop_types.default.node),
100
100
  import_prop_types.default.node
101
101
  ]),
102
- noPadding: import_prop_types.bool
102
+ noPadding: import_prop_types.bool,
103
+ bg: import_prop_types.default.string
103
104
  };
104
105
  Heading.defaultProps = {
105
106
  children: void 0,
106
- noPadding: false
107
+ noPadding: false,
108
+ bg: void 0
107
109
  };
108
110
  var Heading_default = Heading;
@@ -73,4 +73,10 @@ describe("<Heading />", () => {
73
73
  );
74
74
  expect(container).toMatchSnapshot();
75
75
  });
76
+ it("should override the background color", () => {
77
+ const { container } = (0, import_react2.render)(
78
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Heading, { bg: "yoga", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Title.default, { children: "Gympass" }) }) })
79
+ );
80
+ expect(container).toMatchSnapshot();
81
+ });
76
82
  });
@@ -33,6 +33,7 @@ __export(StyledHeading_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(StyledHeading_exports);
35
35
  var import_styled_components = __toESM(require("styled-components"));
36
+ var import_yoga_system = require("@gympass/yoga-system");
36
37
  const StyledHeading = import_styled_components.default.header`
37
38
  ${({
38
39
  noPadding,
@@ -43,7 +44,8 @@ const StyledHeading = import_styled_components.default.header`
43
44
  }
44
45
  }) => {
45
46
  return import_styled_components.css`
46
- background: ${heading.background};
47
+ background-color: ${heading.background};
48
+ ${import_yoga_system.backgroundColor}
47
49
  padding: ${heading.padding.vertical}px ${heading.padding.horizontal}px;
48
50
  min-height: ${heading.height}px;
49
51
  width: 100%;
@@ -68,11 +68,13 @@ Heading.propTypes = {
68
68
  PropTypes.arrayOf(PropTypes.node),
69
69
  PropTypes.node
70
70
  ]),
71
- noPadding: bool
71
+ noPadding: bool,
72
+ bg: PropTypes.string
72
73
  };
73
74
  Heading.defaultProps = {
74
75
  children: void 0,
75
- noPadding: false
76
+ noPadding: false,
77
+ bg: void 0
76
78
  };
77
79
  var Heading_default = Heading;
78
80
  export {
@@ -50,4 +50,10 @@ describe("<Heading />", () => {
50
50
  );
51
51
  expect(container).toMatchSnapshot();
52
52
  });
53
+ it("should override the background color", () => {
54
+ const { container } = render(
55
+ /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Heading, { bg: "yoga", children: /* @__PURE__ */ jsx(Title, { children: "Gympass" }) }) })
56
+ );
57
+ expect(container).toMatchSnapshot();
58
+ });
53
59
  });
@@ -1,4 +1,5 @@
1
1
  import styled, { css } from "styled-components";
2
+ import { backgroundColor } from "@gympass/yoga-system";
2
3
  const StyledHeading = styled.header`
3
4
  ${({
4
5
  noPadding,
@@ -9,7 +10,8 @@ const StyledHeading = styled.header`
9
10
  }
10
11
  }) => {
11
12
  return css`
12
- background: ${heading.background};
13
+ background-color: ${heading.background};
14
+ ${backgroundColor}
13
15
  padding: ${heading.padding.vertical}px ${heading.padding.horizontal}px;
14
16
  min-height: ${heading.height}px;
15
17
  width: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gympass/yoga",
3
- "version": "7.100.1",
3
+ "version": "7.101.0",
4
4
  "description": "Gympass component library",
5
5
  "main": "./cjs",
6
6
  "types": "./typings/index.d.ts",
@@ -57,7 +57,7 @@
57
57
  "react-native": "0.72.3",
58
58
  "styled-components": "^4.4.0"
59
59
  },
60
- "gitHead": "9b2d163cc6d1c9d7ca5ef9a69921f5efd5c333a3",
60
+ "gitHead": "8ccabf1298bbd512d0b1b50ce59c4ff5aea32a20",
61
61
  "module": "./esm",
62
62
  "private": false,
63
63
  "react-native": "./cjs/index.native.js"
@@ -375,11 +375,14 @@ declare namespace Heading {
375
375
  namespace propTypes {
376
376
  export const children: prop_types__default.Requireable<string | number | boolean | prop_types__default.ReactElementLike | prop_types__default.ReactNodeArray>;
377
377
  export { bool as noPadding };
378
+ export const bg: prop_types__default.Requireable<string>;
378
379
  }
379
380
  namespace defaultProps {
380
381
  const children_1: undefined;
381
382
  export { children_1 as children };
382
383
  export const noPadding: boolean;
384
+ const bg_1: undefined;
385
+ export { bg_1 as bg };
383
386
  }
384
387
  }
385
388