Zipline-Android-App/components/skeleton/ColorPicker.tsx
Stef-00012 438f3b9bbe
Some checks failed
Build APK / build (push) Has been cancelled
add skeleton loading, fix not being able to login when non-admin
2025-05-05 19:37:09 +02:00

48 lines
918 B
TypeScript

import { styles } from "@/styles/components/colorPicker";
import { View, Text } from "react-native";
import type React from "react";
import Skeleton from "./Skeleton";
interface CustomColorPickerProps {
description?: string;
title?: string;
}
export default function SkeletonColorPicker({
description,
title,
}: CustomColorPickerProps) {
return (
<>
{title && (
<>
<Text
style={{
...styles.inputHeader,
...(!description && {
marginBottom: 5,
}),
...styles.inputHeaderDisabled,
}}
>
{title}
</Text>
{description && (
<Text style={styles.inputDescription}>{description}</Text>
)}
</>
)}
<View style={styles.input}>
<Skeleton height={17} width={60} />
<View
style={{
...styles.inputPreview,
borderColor: "#ccc",
backgroundColor: "#ffffff",
}}
/>
</View>
</>
);
}