native-pytech 1.0.81 → 1.0.85
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/dist/libs/colorPage/index.d.ts +2 -0
- package/dist/libs/colorPage/src/Content/index.android.d.ts +1 -1
- package/dist/libs/colorPage/src/Content/index.android.js +2 -3
- package/dist/libs/colorPage/src/Item/types.d.ts +2 -2
- package/dist/libs/colorPage/src/Page/types.d.ts +8 -1
- package/package.json +1 -1
- package/dist/libs/colorPage/src/Item/index.android.d.ts +0 -4
- package/dist/libs/colorPage/src/Item/index.android.js +0 -14
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type Props from './types';
|
|
3
|
-
declare const _default: React.MemoExoticComponent<({ colorRows, ...pageProps }: Props) => React.JSX.Element>;
|
|
3
|
+
declare const _default: React.MemoExoticComponent<({ colorRows, renderItem, ...pageProps }: Props) => React.JSX.Element>;
|
|
4
4
|
export default _default;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Host, Column, Row } from '@expo/ui/jetpack-compose';
|
|
2
2
|
import React, { memo } from 'react';
|
|
3
|
-
|
|
4
|
-
export default memo(({ colorRows, ...pageProps }) => {
|
|
3
|
+
export default memo(({ colorRows, renderItem, ...pageProps }) => {
|
|
5
4
|
return (<Host style={{ flex: 1 }}>
|
|
6
5
|
<Column verticalArrangement={{ spacedBy: 16 }}>
|
|
7
6
|
{colorRows.map((row, index) => (<Row key={index} verticalArrangement="spaceEvenly">
|
|
8
|
-
{row.map((color, indexColor) => (
|
|
7
|
+
{row.map((color, indexColor) => (renderItem?.({ color, size: 55, ...pageProps })))}
|
|
9
8
|
</Row>))}
|
|
10
9
|
</Column>
|
|
11
10
|
</Host>);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ColorsType } from '../../../../libs/components/Gradient';
|
|
2
|
-
type
|
|
2
|
+
import type itemProps from '../Item/types';
|
|
3
|
+
export type BaseProps = {
|
|
3
4
|
/**
|
|
4
5
|
Title of the date picker.
|
|
5
6
|
@default 'default'
|
|
@@ -10,4 +11,10 @@ type Props = {
|
|
|
10
11
|
*/
|
|
11
12
|
onSelectColor?: (color: ColorsType) => void;
|
|
12
13
|
};
|
|
14
|
+
type Props = BaseProps & {
|
|
15
|
+
/**
|
|
16
|
+
Function to render the item.
|
|
17
|
+
*/
|
|
18
|
+
renderItem?: (props: itemProps) => React.ReactNode;
|
|
19
|
+
};
|
|
13
20
|
export default Props;
|
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { clip, size as sizeModifier, border, background, clickable } from '@expo/ui/jetpack-compose/modifiers';
|
|
2
|
-
import { Box } from '@expo/ui/jetpack-compose';
|
|
3
|
-
import React, { memo, useMemo } from 'react';
|
|
4
|
-
import { colors } from '../../../../libs/components/Gradient';
|
|
5
|
-
export default memo(({ color, size, selectedColor, onSelectColor, }) => {
|
|
6
|
-
const modifiers = useMemo(() => [
|
|
7
|
-
sizeModifier(size, size),
|
|
8
|
-
border(2, colors[color].light),
|
|
9
|
-
background(colors[color].middle),
|
|
10
|
-
clip({ type: 'circle' }),
|
|
11
|
-
clickable(() => onSelectColor?.(color))
|
|
12
|
-
], []);
|
|
13
|
-
return <Box modifiers={modifiers}/>;
|
|
14
|
-
});
|