@gympass/yoga 7.115.4 → 7.115.5
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.
|
@@ -29,14 +29,7 @@ var import__2 = __toESM(require("."));
|
|
|
29
29
|
describe("TextWithBadge", () => {
|
|
30
30
|
it("should match snapshot", () => {
|
|
31
31
|
const { toJSON } = (0, import_react_native.render)(
|
|
32
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
33
|
-
import__2.default,
|
|
34
|
-
{
|
|
35
|
-
avatarWidth: 50,
|
|
36
|
-
badgeIcon: import_yoga_icons.WellhubIcon,
|
|
37
|
-
title: "Text with badge"
|
|
38
|
-
}
|
|
39
|
-
) })
|
|
32
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.default, { badgeIcon: import_yoga_icons.WellhubIcon, title: "Text with badge" }) })
|
|
40
33
|
);
|
|
41
34
|
expect(toJSON()).toMatchSnapshot();
|
|
42
35
|
});
|
|
@@ -45,7 +38,6 @@ describe("TextWithBadge", () => {
|
|
|
45
38
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
46
39
|
import__2.default,
|
|
47
40
|
{
|
|
48
|
-
avatarWidth: 50,
|
|
49
41
|
badgeIcon: import_yoga_icons.WellhubIcon,
|
|
50
42
|
title: "This is an example of a very long title that should be truncated"
|
|
51
43
|
}
|
|
@@ -55,14 +47,7 @@ describe("TextWithBadge", () => {
|
|
|
55
47
|
});
|
|
56
48
|
it("should match snapshot without badgeIcon", () => {
|
|
57
49
|
const { toJSON } = (0, import_react_native.render)(
|
|
58
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
59
|
-
import__2.default,
|
|
60
|
-
{
|
|
61
|
-
avatarWidth: 50,
|
|
62
|
-
badgeIcon: null,
|
|
63
|
-
title: "Title without Badge"
|
|
64
|
-
}
|
|
65
|
-
) })
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.default, { badgeIcon: null, title: "Title without Badge" }) })
|
|
66
51
|
);
|
|
67
52
|
expect(toJSON()).toMatchSnapshot();
|
|
68
53
|
});
|
|
@@ -51,7 +51,7 @@ const Result = ({
|
|
|
51
51
|
badgeIcon
|
|
52
52
|
}) => {
|
|
53
53
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.StyledBox, { divided, display: "flex", flexDirection: "row", children: [
|
|
54
|
-
Avatar && (0, import_react.isValidElement)(Avatar) ? Avatar : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Avatar, {}),
|
|
54
|
+
Avatar && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: (0, import_react.isValidElement)(Avatar) ? Avatar : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Avatar, {}) }),
|
|
55
55
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Content, { children: [
|
|
56
56
|
!!(attendances == null ? void 0 : attendances.length) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
57
57
|
import_Attendances.default,
|
|
@@ -6,14 +6,7 @@ import TextWithBadge from ".";
|
|
|
6
6
|
describe("TextWithBadge", () => {
|
|
7
7
|
it("should match snapshot", () => {
|
|
8
8
|
const { toJSON } = render(
|
|
9
|
-
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(
|
|
10
|
-
TextWithBadge,
|
|
11
|
-
{
|
|
12
|
-
avatarWidth: 50,
|
|
13
|
-
badgeIcon: WellhubIcon,
|
|
14
|
-
title: "Text with badge"
|
|
15
|
-
}
|
|
16
|
-
) })
|
|
9
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(TextWithBadge, { badgeIcon: WellhubIcon, title: "Text with badge" }) })
|
|
17
10
|
);
|
|
18
11
|
expect(toJSON()).toMatchSnapshot();
|
|
19
12
|
});
|
|
@@ -22,7 +15,6 @@ describe("TextWithBadge", () => {
|
|
|
22
15
|
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(
|
|
23
16
|
TextWithBadge,
|
|
24
17
|
{
|
|
25
|
-
avatarWidth: 50,
|
|
26
18
|
badgeIcon: WellhubIcon,
|
|
27
19
|
title: "This is an example of a very long title that should be truncated"
|
|
28
20
|
}
|
|
@@ -32,14 +24,7 @@ describe("TextWithBadge", () => {
|
|
|
32
24
|
});
|
|
33
25
|
it("should match snapshot without badgeIcon", () => {
|
|
34
26
|
const { toJSON } = render(
|
|
35
|
-
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(
|
|
36
|
-
TextWithBadge,
|
|
37
|
-
{
|
|
38
|
-
avatarWidth: 50,
|
|
39
|
-
badgeIcon: null,
|
|
40
|
-
title: "Title without Badge"
|
|
41
|
-
}
|
|
42
|
-
) })
|
|
27
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(TextWithBadge, { badgeIcon: null, title: "Title without Badge" }) })
|
|
43
28
|
);
|
|
44
29
|
expect(toJSON()).toMatchSnapshot();
|
|
45
30
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React, { isValidElement } from "react";
|
|
3
3
|
import { arrayOf, string, shape, func, bool, node } from "prop-types";
|
|
4
4
|
import Text from "../../../Text";
|
|
@@ -18,7 +18,7 @@ const Result = ({
|
|
|
18
18
|
badgeIcon
|
|
19
19
|
}) => {
|
|
20
20
|
return /* @__PURE__ */ jsxs(StyledBox, { divided, display: "flex", flexDirection: "row", children: [
|
|
21
|
-
Avatar && isValidElement(Avatar) ? Avatar : /* @__PURE__ */ jsx(Avatar, {}),
|
|
21
|
+
Avatar && /* @__PURE__ */ jsx(Fragment, { children: isValidElement(Avatar) ? Avatar : /* @__PURE__ */ jsx(Avatar, {}) }),
|
|
22
22
|
/* @__PURE__ */ jsxs(Content, { children: [
|
|
23
23
|
!!(attendances == null ? void 0 : attendances.length) && /* @__PURE__ */ jsx(
|
|
24
24
|
Attendances,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gympass/yoga",
|
|
3
|
-
"version": "7.115.
|
|
3
|
+
"version": "7.115.5",
|
|
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": "
|
|
60
|
+
"gitHead": "adc1a649540d9a6174d0211a610140b050d907c5",
|
|
61
61
|
"module": "./esm",
|
|
62
62
|
"private": false,
|
|
63
63
|
"react-native": "./cjs/index.native.js"
|