managarten/memoro/apps/mobile/components/statistics/WeekdayChartSkeleton.tsx
Till-JS e7f5f942f3 chore: initial commit - consolidate 4 projects into monorepo
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>
2025-11-22 23:38:24 +01:00

67 lines
2 KiB
TypeScript

import React from 'react';
import { View } from 'react-native';
import { useTheme } from '~/features/theme/ThemeProvider';
/**
* Skeleton loader for WeekdayChart component
* Matches exact WeekdayChart structure: just a simple list, not a bar chart
*/
const WeekdayChartSkeleton: React.FC = () => {
const { isDark, themeVariant } = useTheme();
const borderColor = isDark ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)';
const skeletonColor = isDark ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)';
return (
<View
style={{
paddingVertical: 12, // matches WeekdayChart paddingVertical
paddingHorizontal: 16, // matches WeekdayChart paddingHorizontal
}}>
{/* Chart title skeleton - matches WeekdayChart title styling */}
<View
style={{
height: 17, // fontSize 14 * fontWeight '500' ≈ 17
width: '60%',
backgroundColor: skeletonColor,
borderRadius: 4,
marginBottom: 8, // matches marginBottom: 8 in WeekdayChart
}}
/>
{/* Weekday items skeleton - matches WeekdayChart list items */}
{[1, 2, 3].map((index) => (
<View
key={index}
style={{
flexDirection: 'row',
alignItems: 'center',
marginBottom: 4, // matches marginBottom: 4 in WeekdayChart
}}>
{/* Day name skeleton - matches WeekdayChart day styling */}
<View
style={{
height: 14, // fontSize 12 ≈ 14
width: '30%',
backgroundColor: skeletonColor,
borderRadius: 4,
flex: 1, // matches flex: 1 in WeekdayChart
}}
/>
{/* Count skeleton - matches WeekdayChart count styling */}
<View
style={{
height: 14, // fontSize 12 ≈ 14
width: '25%',
backgroundColor: skeletonColor,
borderRadius: 4,
}}
/>
</View>
))}
</View>
);
};
export default WeekdayChartSkeleton;