native-pytech 1.0.138 → 1.0.141

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.
@@ -1,3 +1,3 @@
1
- import type Props from "./types";
2
- declare const _default: ({ ...props }: Props) => null;
1
+ import type Props from './types';
2
+ declare const _default: import("react").MemoExoticComponent<({ colorRows, ...pageProps }: Props) => import("react").JSX.Element>;
3
3
  export default _default;
@@ -1 +1,20 @@
1
- export default ({ ...props }) => null;
1
+ import { memo } from 'react';
2
+ import { View, StyleSheet } from 'react-native';
3
+ import Item from '../Item';
4
+ export default memo(({ colorRows, ...pageProps }) => {
5
+ return (<View style={styles.container}>
6
+ {colorRows.map((row, index) => (<View key={index} style={styles.row}>
7
+ {row.map((color, indexColor) => (<Item key={indexColor} color={color} size={100} {...pageProps}/>))}
8
+ </View>))}
9
+ </View>);
10
+ });
11
+ const styles = StyleSheet.create({
12
+ container: {
13
+ flex: 1,
14
+ justifyContent: 'space-evenly',
15
+ },
16
+ row: {
17
+ flexDirection: 'row',
18
+ justifyContent: 'space-evenly',
19
+ },
20
+ });
@@ -1,3 +1,3 @@
1
- import type Props from "./types";
2
- declare const _default: ({ ...props }: Props) => null;
1
+ import type Props from './types';
2
+ declare const _default: import("react").MemoExoticComponent<({ color, size, selectedColor, onSelectColor, }: Props) => import("react").JSX.Element>;
3
3
  export default _default;
@@ -1 +1,21 @@
1
- export default ({ ...props }) => null;
1
+ import { memo } from 'react';
2
+ import { Pressable, StyleSheet } from 'react-native';
3
+ import Gradient, { colors } from '../../../../libs/components/Gradient';
4
+ export default memo(({ color, size, selectedColor, onSelectColor, }) => {
5
+ const isSelected = color === selectedColor;
6
+ return (<Pressable onPress={() => onSelectColor?.(color)} style={[
7
+ styles.container,
8
+ {
9
+ borderColor: isSelected ? colors[color].light : 'transparent',
10
+ }
11
+ ]}>
12
+ <Gradient color={color} type='extraLarge'/>
13
+ </Pressable>);
14
+ });
15
+ const styles = StyleSheet.create({
16
+ container: {
17
+ borderWidth: 4,
18
+ borderRadius: '100%',
19
+ padding: 4,
20
+ },
21
+ });
@@ -1,8 +1,8 @@
1
1
  import { View, Text, Pressable, StyleSheet } from "react-native";
2
2
  import { memo } from 'react';
3
- import Gradient from "native-pytech/components/gradient";
4
- import Colors from "native-pytech/constants/colors";
5
- import { useApp } from "native-pytech/providers/app";
3
+ import Gradient from "../../../../libs/components/Gradient";
4
+ import Colors from "../../../../libs/constants/colors";
5
+ import { useApp } from "../../../../libs/providers/App";
6
6
  export default memo(({ title, subtitle, gradientProps, buttonProps }) => {
7
7
  const { colorScheme } = useApp();
8
8
  const spacing = gradientProps?.type === 'extraLarge' ? 10 : 20;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-pytech",
3
- "version": "1.0.138",
3
+ "version": "1.0.141",
4
4
  "description": "Libreria de React Native Pytech",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",