CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history
EmptyState.tsx
Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.
| c53cf00 | 1 | import React from 'react'; |
| 2 | import { View, Text, StyleSheet } from 'react-native'; | |
| 3 | import { colors } from '../theme/colors'; | |
| 4 | import { fontSizes } from '../theme/typography'; | |
| 5 | ||
| 6 | interface Props { | |
| 7 | title: string; | |
| 8 | subtitle?: string; | |
| 9 | icon?: string; | |
| 10 | } | |
| 11 | ||
| 12 | export function EmptyState({ title, subtitle, icon = '~' }: Props) { | |
| 13 | return ( | |
| 14 | <View style={styles.container}> | |
| 15 | <Text style={styles.icon}>{icon}</Text> | |
| 16 | <Text style={styles.title}>{title}</Text> | |
| 17 | {subtitle && <Text style={styles.subtitle}>{subtitle}</Text>} | |
| 18 | </View> | |
| 19 | ); | |
| 20 | } | |
| 21 | ||
| 22 | const styles = StyleSheet.create({ | |
| 23 | container: { | |
| 24 | flex: 1, | |
| 25 | alignItems: 'center', | |
| 26 | justifyContent: 'center', | |
| 27 | padding: 32, | |
| 28 | backgroundColor: colors.bg, | |
| 29 | }, | |
| 30 | icon: { | |
| 31 | fontSize: 40, | |
| 32 | color: colors.textMuted, | |
| 33 | marginBottom: 12, | |
| 34 | }, | |
| 35 | title: { | |
| 36 | color: colors.text, | |
| 37 | fontSize: fontSizes.md, | |
| 38 | fontWeight: '600', | |
| 39 | textAlign: 'center', | |
| 40 | marginBottom: 8, | |
| 41 | }, | |
| 42 | subtitle: { | |
| 43 | color: colors.textMuted, | |
| 44 | fontSize: fontSizes.sm, | |
| 45 | textAlign: 'center', | |
| 46 | lineHeight: 20, | |
| 47 | }, | |
| 48 | }); |