@jobber/components-native 0.98.3 → 0.98.4

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.
@@ -5,8 +5,6 @@ export declare const useStyles: () => {
5
5
  flexDirection: "row";
6
6
  height: number;
7
7
  justifyContent: "center";
8
- marginHorizontal: number;
9
- marginTop: number;
10
8
  paddingHorizontal: number;
11
9
  };
12
10
  iconLeft: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.98.3",
3
+ "version": "0.98.4",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -96,5 +96,5 @@
96
96
  "react-native-safe-area-context": "^5.4.0",
97
97
  "react-native-svg": ">=12.0.0"
98
98
  },
99
- "gitHead": "4edff1d8859ef42cd6ee00024ef9d40a598d825c"
99
+ "gitHead": "ddc3848f6c721cbc34ddcefecdc4446f50414809"
100
100
  }
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { View } from "react-native";
3
3
  import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
4
- import { Chip } from "@jobber/components-native";
4
+ import { Chip, useAtlantisTheme } from "@jobber/components-native";
5
5
 
6
6
  const meta = {
7
7
  title: "Components/Selections/Chip",
@@ -29,43 +29,54 @@ export const Basic: Story = {
29
29
  },
30
30
  };
31
31
 
32
- const AccentTemplate = (args: Story["args"]) => (
33
- <View style={{ display: "flex", flexDirection: "row", flexWrap: "wrap" }}>
34
- <Chip {...args} />
35
- <Chip
36
- label="Select requests"
37
- accent="request"
38
- icon="request"
39
- onPress={() => alert("Requests")}
40
- accessibilityLabel={"Select Requests"}
41
- isActive={true}
42
- />
43
- <Chip
44
- label="Select quotes"
45
- accent="quote"
46
- icon="quote"
47
- onPress={() => alert("Quotes")}
48
- accessibilityLabel={"Select Quotes"}
49
- isActive={true}
50
- />
51
- <Chip
52
- label="Select jobs"
53
- accent="job"
54
- icon="job"
55
- onPress={() => alert("Jobs")}
56
- accessibilityLabel={"Select Jobs"}
57
- isActive={true}
58
- />
59
- <Chip
60
- label="Select invoices"
61
- accent="invoice"
62
- icon="invoice"
63
- onPress={() => alert("Invoices")}
64
- accessibilityLabel={"Select Invoices"}
65
- isActive={true}
66
- />
67
- </View>
68
- );
32
+ const AccentTemplate = (args: Story["args"]) => {
33
+ const { tokens } = useAtlantisTheme();
34
+
35
+ return (
36
+ <View
37
+ style={{
38
+ display: "flex",
39
+ flexDirection: "row",
40
+ flexWrap: "wrap",
41
+ gap: tokens["space-small"],
42
+ }}
43
+ >
44
+ <Chip {...args} />
45
+ <Chip
46
+ label="Select requests"
47
+ accent="request"
48
+ icon="request"
49
+ onPress={() => alert("Requests")}
50
+ accessibilityLabel={"Select Requests"}
51
+ isActive={true}
52
+ />
53
+ <Chip
54
+ label="Select quotes"
55
+ accent="quote"
56
+ icon="quote"
57
+ onPress={() => alert("Quotes")}
58
+ accessibilityLabel={"Select Quotes"}
59
+ isActive={true}
60
+ />
61
+ <Chip
62
+ label="Select jobs"
63
+ accent="job"
64
+ icon="job"
65
+ onPress={() => alert("Jobs")}
66
+ accessibilityLabel={"Select Jobs"}
67
+ isActive={true}
68
+ />
69
+ <Chip
70
+ label="Select invoices"
71
+ accent="invoice"
72
+ icon="invoice"
73
+ onPress={() => alert("Invoices")}
74
+ accessibilityLabel={"Select Invoices"}
75
+ isActive={true}
76
+ />
77
+ </View>
78
+ );
79
+ };
69
80
 
70
81
  export const Accent: Story = {
71
82
  render: AccentTemplate,
@@ -10,8 +10,6 @@ export const useStyles = buildThemedStyles(tokens => {
10
10
  flexDirection: "row",
11
11
  height: chipHeight,
12
12
  justifyContent: "center",
13
- marginHorizontal: tokens["space-smaller"],
14
- marginTop: tokens["space-small"],
15
13
  paddingHorizontal: tokens["space-base"],
16
14
  },
17
15
  iconLeft: {