cdslibrary 1.0.20 → 1.0.22

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.
@@ -3,10 +3,10 @@ import { Text, StyleSheet, TouchableOpacity } from "react-native";
3
3
  import { Dimensions, Platform } from "react-native";
4
4
  import { MaterialIcons } from "@expo/vector-icons";
5
5
  import { useTheme } from "../context/CDSThemeContext";
6
- import {getSemanticTextStyles} from "../tokens/CDSsemanticTextStyles";
6
+ import { getSemanticTextStyles } from "../tokens/CDSsemanticTextStyles";
7
7
 
8
8
  const { width } = Dimensions.get("window");
9
- const isMobile = width <= 768
9
+ const isMobile = width <= 768
10
10
 
11
11
  export const CDSButton = ({
12
12
  label,
@@ -23,15 +23,15 @@ export const CDSButton = ({
23
23
  type === "disabled"
24
24
  ? theme.surface.action.disabled
25
25
  : type === "secondary" || type === "ghost" || type === "link"
26
- ? "transparent"
27
- : 'green';
26
+ ? "transparent"
27
+ : theme.surface.action.primary;
28
28
 
29
29
  const textColor =
30
30
  type === "secondary" || type === "ghost" || type === "link"
31
31
  ? theme.text.neutral.primary
32
32
  : type === "disabled"
33
- ? theme.text.neutral.disabled
34
- : theme.text.neutral.contrast;
33
+ ? theme.text.neutral.disabled
34
+ : theme.text.neutral.contrast;
35
35
 
36
36
  return (
37
37
  <TouchableOpacity
@@ -41,9 +41,10 @@ export const CDSButton = ({
41
41
  styles.container,
42
42
  { backgroundColor },
43
43
  flexend && { justifyContent: "flex-end", paddingHorizontal: 0 },
44
- isMobile && type !== "icon"
45
- ? { width: "100%" }
46
- : { paddingHorizontal: 12 },
44
+ {
45
+ paddingHorizontal: type === "icon" ? 12 : 24,
46
+ ...(isMobile && { width: "100%" })
47
+ },
47
48
  type === "secondary" && {
48
49
  borderColor: theme.outline.action.primary,
49
50
  borderWidth: 1,
@@ -89,7 +90,7 @@ const styles = StyleSheet.create({
89
90
  justifyContent: "center",
90
91
  paddingVertical: 12,
91
92
  paddingHorizontal: 24,
92
- borderRadius: 10,
93
+ borderRadius: 100,
93
94
  gap: 8,
94
95
  },
95
96
  });
package/index.js CHANGED
@@ -1,10 +1,7 @@
1
+
1
2
  // import { registerRootComponent } from 'expo';
2
3
 
3
4
  // import App from './App';
4
-
5
- // // registerRootComponent calls AppRegistry.registerComponent('main', () => App);
6
- // // It also ensures that whether you load the app in Expo Go or in a native build,
7
- // // the environment is set up appropriately
8
5
  // registerRootComponent(App);
9
6
 
10
7
  export {CDSBottomSheet} from './components/CDSBottomSheet';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cdslibrary",
3
3
  "license": "0BSD",
4
- "version": "1.0.20",
4
+ "version": "1.0.22",
5
5
  "main": "index.js",
6
6
  "author": "Nat Viramontes",
7
7
  "description": "A library of components for the CDS project",