@jobber/components-native 0.69.3-SCOTTTHd.31 → 0.69.3-SCOTTTHd.45

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": "@jobber/components-native",
3
- "version": "0.69.3-SCOTTTHd.31+15d0374e",
3
+ "version": "0.69.3-SCOTTTHd.45+8d76eff1",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -82,5 +82,5 @@
82
82
  "react-native-safe-area-context": "^4.5.2",
83
83
  "react-native-svg": ">=12.0.0"
84
84
  },
85
- "gitHead": "15d0374ed8f1863dbae171f3b6fc998e0be0097c"
85
+ "gitHead": "8d76eff16e7f4fad97727aff66cfb2435b30480a"
86
86
  }
@@ -209,8 +209,8 @@ describe("Button", () => {
209
209
  it("renders an icon Button with same color as the Button text", () => {
210
210
  const { iconColor, textColor } = getIconAndTextColorFromRender({});
211
211
 
212
- expect(iconColor).toBe("rgba(255, 255, 255, 1)");
213
- expect(textColor).toBe(tokens["color-white"]);
212
+ expect(iconColor).toBe(tokens["color-white"]);
213
+ expect(textColor).toBe(iconColor);
214
214
  });
215
215
 
216
216
  it("renders the learning variation and secondary type with icon and label with the same color", () => {
@@ -218,8 +218,8 @@ describe("Button", () => {
218
218
  variation: "learning",
219
219
  type: "secondary",
220
220
  });
221
- expect(iconColor).toBe("hsl(198, 35%, 21%)");
222
- expect(textColor).toBe(tokens["color-interactive--subtle"]);
221
+ expect(iconColor).toBe(tokens["color-interactive--subtle"]);
222
+ expect(textColor).toBe(iconColor);
223
223
  });
224
224
 
225
225
  it("renders the destructive variation and secondary type with icon and label with the same color", () => {
@@ -227,8 +227,8 @@ describe("Button", () => {
227
227
  variation: "destructive",
228
228
  type: "secondary",
229
229
  });
230
- expect(iconColor).toBe("hsl(6, 64%, 51%)");
231
- expect(textColor).toBe(tokens["color-destructive"]);
230
+ expect(iconColor).toBe(tokens["color-destructive"]);
231
+ expect(textColor).toBe(iconColor);
232
232
  });
233
233
 
234
234
  it("renders the cancel variation and tertiary type with icon and label with the same color", () => {
@@ -236,8 +236,8 @@ describe("Button", () => {
236
236
  variation: "cancel",
237
237
  type: "tertiary",
238
238
  });
239
- expect(iconColor).toBe("hsl(198, 35%, 21%)");
240
- expect(textColor).toBe("hsl(198, 35%, 21%)");
239
+ expect(iconColor).toBe(tokens["color-interactive--subtle"]);
240
+ expect(textColor).toBe(iconColor);
241
241
  });
242
242
 
243
243
  it("renders an icon Button if only an icon is passed", () => {
package/src/Icon/Icon.tsx CHANGED
@@ -41,6 +41,7 @@ export function Icon({
41
41
  name,
42
42
  color,
43
43
  size,
44
+ platform: "mobile",
44
45
  format: "js",
45
46
  });
46
47
  const icon = paths.map((path: string) => {
@@ -417,7 +417,11 @@ exports[`renders thumbsDown icon 1`] = `
417
417
  "display": "flex",
418
418
  "fill": "hsl(198, 35%, 21%)",
419
419
  "height": 24,
420
- "transform": "scaleY(-1)",
420
+ "transform": [
421
+ {
422
+ "scaleY": -1,
423
+ },
424
+ ],
421
425
  "verticalAlign": "middle",
422
426
  "width": 24,
423
427
  },
@@ -439,16 +443,6 @@ exports[`renders thumbsDown icon 1`] = `
439
443
  "type": 0,
440
444
  }
441
445
  }
442
- matrix={
443
- [
444
- 1,
445
- 0,
446
- 0,
447
- 1,
448
- 0,
449
- 0,
450
- ]
451
- }
452
446
  propList={
453
447
  [
454
448
  "fill",
@@ -2,6 +2,7 @@ import React from "react";
2
2
  import { fireEvent, render } from "@testing-library/react-native";
3
3
  import { Host } from "react-native-portalize";
4
4
  import { View } from "react-native";
5
+ import { tokens } from "@jobber/design/foundation";
5
6
  import { Menu, MenuOptionProps, MenuProps } from ".";
6
7
  import { Icon } from "../Icon";
7
8
  import { Button } from "../Button";
@@ -129,17 +130,13 @@ describe("Menu", () => {
129
130
  });
130
131
 
131
132
  fireEvent.press(getByLabelText(menuLabel));
132
- expect(getByTestId("add").props.style).toStrictEqual([
133
- { backgroundColor: "transparent", borderWidth: 0 },
134
- {
135
- display: "flex",
136
- fill: "hsl(6, 64%, 51%)",
137
- height: 24,
138
- verticalAlign: "middle",
139
- width: 24,
140
- },
141
- { flex: 0, height: 24, width: 24 },
142
- ]);
133
+ expect(getByTestId("add").props.style).toContainEqual({
134
+ display: "flex",
135
+ fill: tokens["color-critical"],
136
+ height: 24,
137
+ verticalAlign: "middle",
138
+ width: 24,
139
+ });
143
140
  });
144
141
 
145
142
  it("closes the menu after clicking on a menu option", () => {