mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-18 21:41:23 +02:00
Projects included: - maerchenzauber (NestJS backend + Expo mobile + SvelteKit web + Astro landing) - manacore (Expo mobile + SvelteKit web + Astro landing) - manadeck (NestJS backend + Expo mobile + SvelteKit web) - memoro (Expo mobile + SvelteKit web + Astro landing) This commit preserves the current state before monorepo restructuring. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
106 lines
No EOL
2.5 KiB
TypeScript
106 lines
No EOL
2.5 KiB
TypeScript
import React from 'react';
|
|
import { View, StyleSheet } from 'react-native';
|
|
import { useTheme } from '~/features/theme/ThemeProvider';
|
|
import colors from '~/tailwind.config.js';
|
|
|
|
/**
|
|
* Skeleton loader for BlueprintCard component
|
|
* Matches exact BlueprintCard structure and dimensions
|
|
*/
|
|
const BlueprintCardSkeleton = () => {
|
|
const { isDark, themeVariant } = useTheme();
|
|
|
|
// Get theme colors
|
|
const borderColor = isDark
|
|
? ((colors as any).theme?.extend?.colors?.dark)?.[themeVariant]?.border || '#424242'
|
|
: ((colors as any).theme?.extend?.colors)?.[themeVariant]?.border || '#e6e6e6';
|
|
|
|
const backgroundColor = isDark
|
|
? ((colors as any).theme?.extend?.colors?.dark)?.[themeVariant]?.contentBackground
|
|
: ((colors as any).theme?.extend?.colors)?.[themeVariant]?.contentBackground;
|
|
|
|
const skeletonColor = isDark ? '#3a3a3a' : '#e0e0e0';
|
|
|
|
return (
|
|
<View
|
|
style={[
|
|
styles.container,
|
|
{
|
|
backgroundColor,
|
|
borderWidth: 1,
|
|
borderColor
|
|
}
|
|
]}
|
|
>
|
|
<View style={styles.header}>
|
|
{/* Title skeleton */}
|
|
<View
|
|
style={[
|
|
styles.titleSkeleton,
|
|
{ backgroundColor: skeletonColor }
|
|
]}
|
|
/>
|
|
|
|
{/* Pin icon skeleton */}
|
|
<View
|
|
style={[
|
|
styles.iconSkeleton,
|
|
{
|
|
backgroundColor: isDark ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.05)'
|
|
}
|
|
]}
|
|
/>
|
|
</View>
|
|
|
|
{/* Description skeleton - two lines */}
|
|
<View>
|
|
<View
|
|
style={[
|
|
styles.descriptionLine,
|
|
{ backgroundColor: skeletonColor, width: '100%' }
|
|
]}
|
|
/>
|
|
<View
|
|
style={[
|
|
styles.descriptionLine,
|
|
{ backgroundColor: skeletonColor, width: '75%' }
|
|
]}
|
|
/>
|
|
</View>
|
|
</View>
|
|
);
|
|
};
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
borderRadius: 16,
|
|
padding: 16,
|
|
marginBottom: 12,
|
|
},
|
|
header: {
|
|
flexDirection: 'row',
|
|
justifyContent: 'space-between',
|
|
alignItems: 'center',
|
|
marginBottom: 8,
|
|
},
|
|
titleSkeleton: {
|
|
height: 20,
|
|
width: 180,
|
|
borderRadius: 4,
|
|
opacity: 0.6,
|
|
},
|
|
iconSkeleton: {
|
|
width: 36,
|
|
height: 36,
|
|
borderRadius: 8,
|
|
opacity: 0.6,
|
|
},
|
|
descriptionLine: {
|
|
height: 14,
|
|
borderRadius: 3,
|
|
marginBottom: 6,
|
|
opacity: 0.5,
|
|
},
|
|
});
|
|
|
|
export default BlueprintCardSkeleton; |