mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-04-30 20:36:29 +01:00
chore
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import { useMemo } from "react";
|
||||||
import { StyleSheet, View, ViewProps } from "react-native";
|
import { StyleSheet, View, ViewProps } from "react-native";
|
||||||
|
|
||||||
const getItemStyle = (index: number, numColumns: number) => {
|
const getItemStyle = (index: number, numColumns: number) => {
|
||||||
@@ -9,6 +10,7 @@ const getItemStyle = (index: number, numColumns: number) => {
|
|||||||
})();
|
})();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
padding: 20,
|
||||||
alignItems,
|
alignItems,
|
||||||
width: "100%",
|
width: "100%",
|
||||||
} as const;
|
} as const;
|
||||||
@@ -19,16 +21,22 @@ type ColumnItemProps = ViewProps & {
|
|||||||
index: number;
|
index: number;
|
||||||
numColumns: number;
|
numColumns: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ColumnItem = ({
|
export const ColumnItem = ({
|
||||||
children,
|
children,
|
||||||
index,
|
index,
|
||||||
numColumns,
|
numColumns,
|
||||||
...rest
|
...rest
|
||||||
}: ColumnItemProps) => (
|
}: ColumnItemProps) => {
|
||||||
<View
|
return (
|
||||||
style={StyleSheet.flatten([getItemStyle(index, numColumns), rest.style])}
|
<View className="flex flex-col mb-2 p-4" style={{ width: "33.3%" }}>
|
||||||
{...rest}
|
<View
|
||||||
>
|
className={`
|
||||||
{children}
|
`}
|
||||||
</View>
|
{...rest}
|
||||||
);
|
>
|
||||||
|
{children}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user