@gympass/yoga 7.40.0 → 7.40.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.
@@ -33,5 +33,6 @@ var BackButton = function BackButton(_ref) {
33
33
  BackButton.propTypes = {
34
34
  onClick: _propTypes["default"].func.isRequired
35
35
  };
36
+ BackButton.displayName = 'Heading.BackButton';
36
37
  var _default = BackButton;
37
38
  exports["default"] = _default;
@@ -11,6 +11,12 @@ var _StyledHeading = _interopRequireWildcard(require("./StyledHeading"));
11
11
 
12
12
  var _Box = _interopRequireDefault(require("../../Box"));
13
13
 
14
+ var _Title = _interopRequireDefault(require("./Title"));
15
+
16
+ var _BackButton = _interopRequireDefault(require("./BackButton"));
17
+
18
+ var _RightButton = _interopRequireDefault(require("./RightButton"));
19
+
14
20
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
21
 
16
22
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -25,9 +31,9 @@ var Heading = function Heading(_ref) {
25
31
  if (!children) throw new Error('Heading needs at least one child');
26
32
 
27
33
  var defineComponent = function defineComponent(child) {
28
- if (child.type.name === 'Title') title = child;
29
- if (child.type.name === 'BackButton') backButton = child;
30
- if (child.type.name === 'RightButton') rightButtons.push(child);
34
+ if (child.type.displayName === _Title["default"].displayName) title = child;
35
+ if (child.type.displayName === _BackButton["default"].displayName) backButton = child;
36
+ if (child.type.displayName === _RightButton["default"].displayName) rightButtons.push(child);
31
37
  };
32
38
 
33
39
  if (Array.isArray(children)) {
@@ -33,5 +33,6 @@ RightButton.propTypes = {
33
33
  onClick: _propTypes["default"].func.isRequired,
34
34
  icon: _propTypes["default"].elementType.isRequired
35
35
  };
36
+ RightButton.displayName = 'Heading.RightButton';
36
37
  var _default = RightButton;
37
38
  exports["default"] = _default;
@@ -35,5 +35,6 @@ var Title = function Title(_ref) {
35
35
  Title.propTypes = {
36
36
  children: _propTypes["default"].string.isRequired
37
37
  };
38
+ Title.displayName = 'Heading.Title';
38
39
  var _default = Title;
39
40
  exports["default"] = _default;
@@ -23,4 +23,5 @@ var BackButton = function BackButton(_ref) {
23
23
  BackButton.propTypes = {
24
24
  onClick: PropTypes.func.isRequired
25
25
  };
26
+ BackButton.displayName = 'Heading.BackButton';
26
27
  export default BackButton;
@@ -2,6 +2,9 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import StyledHeading, { Button } from './StyledHeading';
4
4
  import Box from '../../Box';
5
+ import Title from './Title';
6
+ import BackButton from './BackButton';
7
+ import RightButton from './RightButton';
5
8
 
6
9
  var Heading = function Heading(_ref) {
7
10
  var children = _ref.children;
@@ -11,9 +14,9 @@ var Heading = function Heading(_ref) {
11
14
  if (!children) throw new Error('Heading needs at least one child');
12
15
 
13
16
  var defineComponent = function defineComponent(child) {
14
- if (child.type.name === 'Title') title = child;
15
- if (child.type.name === 'BackButton') backButton = child;
16
- if (child.type.name === 'RightButton') rightButtons.push(child);
17
+ if (child.type.displayName === Title.displayName) title = child;
18
+ if (child.type.displayName === BackButton.displayName) backButton = child;
19
+ if (child.type.displayName === RightButton.displayName) rightButtons.push(child);
17
20
  };
18
21
 
19
22
  if (Array.isArray(children)) {
@@ -24,4 +24,5 @@ RightButton.propTypes = {
24
24
  onClick: PropTypes.func.isRequired,
25
25
  icon: PropTypes.elementType.isRequired
26
26
  };
27
+ RightButton.displayName = 'Heading.RightButton';
27
28
  export default RightButton;
@@ -25,4 +25,5 @@ var Title = function Title(_ref) {
25
25
  Title.propTypes = {
26
26
  children: PropTypes.string.isRequired
27
27
  };
28
+ Title.displayName = 'Heading.Title';
28
29
  export default Title;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gympass/yoga",
3
- "version": "7.40.0",
3
+ "version": "7.40.1",
4
4
  "description": "Gympass component library",
5
5
  "main": "./cjs",
6
6
  "sideEffects": false,
@@ -49,7 +49,7 @@
49
49
  "react": ">=16",
50
50
  "styled-components": "^4.4.0"
51
51
  },
52
- "gitHead": "111ff054a87fbb3e00ca49c8dea6d83ebf695a8a",
52
+ "gitHead": "69180fcb15f0df3be0b74720c4324c681b56ae15",
53
53
  "module": "./esm",
54
54
  "private": false,
55
55
  "react-native": "./cjs/index.native.js"