@hoddy-ui/core 1.0.63 → 1.0.65

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/index.ts CHANGED
@@ -15,6 +15,7 @@ export * from "./src/Components/Grid";
15
15
  export * from "./src/Components/Locator";
16
16
  export * from "./src/Components/Popup";
17
17
  export * from "./src/Components/SafeAreaView";
18
+ export * from "./src/Components/Divider";
18
19
  export { default as SelectMenu } from "./src/Components/SelectMenu";
19
20
  export { default as Spinner } from "./src/Components/Spinner";
20
21
  export * from "./src/Components/TextField";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hoddy-ui/core",
3
- "version": "1.0.63",
3
+ "version": "1.0.65",
4
4
  "description": "Core rich react native components written in typescript",
5
5
  "main": "index.ts",
6
6
  "repository": {
@@ -0,0 +1,22 @@
1
+ import { FC } from "react";
2
+ import { View } from "react-native";
3
+ import { ScaledSheet } from "react-native-size-matters";
4
+ import { useColors } from "../hooks";
5
+ import { DividerProps } from "../types";
6
+
7
+ export const Divider: FC<DividerProps> = ({
8
+ height = 1,
9
+ color = "textSecondary",
10
+ gutterBottom = 0,
11
+ }) => {
12
+ const colors = useColors();
13
+
14
+ const styles = ScaledSheet.create({
15
+ root: {
16
+ height,
17
+ backgroundColor: colors[color].main,
18
+ marginBottom: gutterBottom,
19
+ },
20
+ });
21
+ return <View style={styles.root} />;
22
+ };
package/src/types.ts CHANGED
@@ -304,3 +304,10 @@ export interface RatingInputProps {
304
304
  size?: number;
305
305
  onSubmit?: (data: { rating: number; review: string }) => Promise<void>;
306
306
  }
307
+
308
+ export interface DividerProps {
309
+ color?: colorTypes;
310
+ gutterBottom?: number;
311
+ style?: ViewStyle;
312
+ height?: number;
313
+ }