195 lines
4.7 KiB
TypeScript
195 lines
4.7 KiB
TypeScript
import { StyleSheet } from 'react-native';
|
|
import { typography } from '@theme';
|
|
|
|
export const getStyles = (colors: any) =>
|
|
StyleSheet.create({
|
|
container: {
|
|
flex: 1,
|
|
backgroundColor: colors.background,
|
|
},
|
|
loadingContainer: {
|
|
flex: 1,
|
|
justifyContent: 'center',
|
|
alignItems: 'center',
|
|
},
|
|
loadingText: {
|
|
marginTop: 12,
|
|
fontSize: typography.fontSize.md,
|
|
color: colors.textSecondary,
|
|
},
|
|
errorContainer: {
|
|
flex: 1,
|
|
justifyContent: 'center',
|
|
alignItems: 'center',
|
|
padding: 20,
|
|
},
|
|
errorText: {
|
|
fontSize: typography.fontSize.md,
|
|
color: colors.error,
|
|
textAlign: 'center',
|
|
},
|
|
content: {
|
|
padding: 16,
|
|
paddingBottom: 40,
|
|
},
|
|
section: {
|
|
backgroundColor: colors.cardBg,
|
|
borderRadius: 12,
|
|
padding: 16,
|
|
marginBottom: 16,
|
|
borderWidth: 1,
|
|
borderColor: colors.border,
|
|
},
|
|
// Used for the OrderStatusTimeline section — no inner padding as the
|
|
// component renders its own self-contained card with rounded borders.
|
|
timelineSection: {
|
|
marginBottom: 16,
|
|
},
|
|
sectionTitle: {
|
|
fontSize: typography.fontSize.md,
|
|
fontWeight: typography.fontWeight.bold,
|
|
color: colors.text,
|
|
marginBottom: 12,
|
|
},
|
|
headerRow: {
|
|
flexDirection: 'row',
|
|
justifyContent: 'space-between',
|
|
alignItems: 'center',
|
|
marginBottom: 12,
|
|
},
|
|
orderNumber: {
|
|
fontSize: typography.fontSize.lg,
|
|
fontWeight: typography.fontWeight.bold,
|
|
color: colors.text,
|
|
},
|
|
statusBadge: {
|
|
paddingHorizontal: 10,
|
|
paddingVertical: 4,
|
|
borderRadius: 12,
|
|
backgroundColor: '#E8F5E9',
|
|
},
|
|
statusText: {
|
|
fontSize: typography.fontSize.xs,
|
|
fontWeight: typography.fontWeight.bold,
|
|
color: colors.primary,
|
|
},
|
|
dateText: {
|
|
fontSize: typography.fontSize.sm,
|
|
color: colors.textSecondary,
|
|
marginBottom: 4,
|
|
},
|
|
merchantRow: {
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
marginTop: 8,
|
|
paddingTop: 12,
|
|
borderTopWidth: 1,
|
|
borderTopColor: colors.border,
|
|
},
|
|
merchantIcon: {
|
|
width: 32,
|
|
height: 32,
|
|
borderRadius: 16,
|
|
backgroundColor: colors.surface,
|
|
justifyContent: 'center',
|
|
alignItems: 'center',
|
|
marginRight: 12,
|
|
},
|
|
merchantName: {
|
|
fontSize: typography.fontSize.md,
|
|
fontWeight: typography.fontWeight.semibold,
|
|
color: colors.text,
|
|
},
|
|
itemRow: {
|
|
flexDirection: 'row',
|
|
justifyContent: 'space-between',
|
|
alignItems: 'flex-start',
|
|
marginBottom: 12,
|
|
},
|
|
itemInfo: {
|
|
flex: 1,
|
|
flexDirection: 'row',
|
|
alignItems: 'flex-start',
|
|
marginRight: 16,
|
|
},
|
|
itemQuantityBadge: {
|
|
backgroundColor: colors.surface,
|
|
borderWidth: 1,
|
|
borderColor: colors.border,
|
|
borderRadius: 4,
|
|
paddingHorizontal: 6,
|
|
paddingVertical: 2,
|
|
marginRight: 10,
|
|
marginTop: 2,
|
|
},
|
|
itemQuantityText: {
|
|
fontSize: typography.fontSize.xs,
|
|
fontWeight: typography.fontWeight.bold,
|
|
color: colors.text,
|
|
},
|
|
itemName: {
|
|
fontSize: typography.fontSize.sm,
|
|
color: colors.text,
|
|
lineHeight: 20,
|
|
},
|
|
itemPrice: {
|
|
fontSize: typography.fontSize.sm,
|
|
fontWeight: typography.fontWeight.semibold,
|
|
color: colors.text,
|
|
marginTop: 2,
|
|
},
|
|
billRow: {
|
|
flexDirection: 'row',
|
|
justifyContent: 'space-between',
|
|
marginBottom: 8,
|
|
},
|
|
billLabel: {
|
|
fontSize: typography.fontSize.sm,
|
|
color: colors.textSecondary,
|
|
},
|
|
billValue: {
|
|
fontSize: typography.fontSize.sm,
|
|
color: colors.text,
|
|
fontWeight: typography.fontWeight.medium,
|
|
},
|
|
billDivider: {
|
|
height: 1,
|
|
backgroundColor: colors.border,
|
|
marginVertical: 12,
|
|
},
|
|
billTotalLabel: {
|
|
fontSize: typography.fontSize.md,
|
|
fontWeight: typography.fontWeight.bold,
|
|
color: colors.text,
|
|
},
|
|
billTotalValue: {
|
|
fontSize: typography.fontSize.md,
|
|
fontWeight: typography.fontWeight.bold,
|
|
color: colors.primary,
|
|
},
|
|
addressType: {
|
|
fontSize: typography.fontSize.sm,
|
|
fontWeight: typography.fontWeight.semibold,
|
|
color: colors.text,
|
|
marginBottom: 4,
|
|
},
|
|
addressText: {
|
|
fontSize: typography.fontSize.sm,
|
|
color: colors.textSecondary,
|
|
lineHeight: 20,
|
|
},
|
|
paymentRow: {
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
},
|
|
paymentIcon: {
|
|
marginRight: 8,
|
|
fontSize: 20,
|
|
},
|
|
paymentText: {
|
|
fontSize: typography.fontSize.sm,
|
|
color: colors.text,
|
|
fontWeight: typography.fontWeight.medium,
|
|
},
|
|
});
|