@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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components-native",
|
|
3
|
-
"version": "0.98.
|
|
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": "
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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,
|
package/src/Chip/Chip.style.ts
CHANGED
|
@@ -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: {
|