144 lines
3.2 KiB
TypeScript
144 lines
3.2 KiB
TypeScript
import { StyleSheet, Platform } from 'react-native';
|
|
import { typography } from '@theme';
|
|
|
|
export const getStyles = (colors: any) =>
|
|
StyleSheet.create({
|
|
container: {
|
|
backgroundColor: colors.cardBg,
|
|
borderRadius: 18,
|
|
marginHorizontal: 16,
|
|
marginVertical: 8,
|
|
overflow: 'hidden',
|
|
...Platform.select({
|
|
ios: {
|
|
shadowColor: '#000',
|
|
shadowOffset: { width: 0, height: 3 },
|
|
shadowOpacity: 0.06,
|
|
shadowRadius: 10,
|
|
},
|
|
android: { elevation: 2 },
|
|
}),
|
|
},
|
|
|
|
// ---------- Image ----------
|
|
imageWrap: {
|
|
width: '100%',
|
|
height: 150,
|
|
position: 'relative',
|
|
backgroundColor: colors.border,
|
|
},
|
|
image: {
|
|
width: '100%',
|
|
height: '100%',
|
|
},
|
|
imagePlaceholder: {
|
|
width: '100%',
|
|
height: '100%',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
backgroundColor: colors.border,
|
|
},
|
|
imagePlaceholderEmoji: {
|
|
fontSize: 34,
|
|
},
|
|
|
|
discountRibbon: {
|
|
position: 'absolute',
|
|
top: 12,
|
|
left: 0,
|
|
backgroundColor: colors.primary,
|
|
paddingVertical: 4,
|
|
paddingHorizontal: 10,
|
|
borderTopRightRadius: 8,
|
|
borderBottomRightRadius: 8,
|
|
},
|
|
discountRibbonText: {
|
|
color: '#FFFFFF',
|
|
fontSize: typography.fontSize.xs,
|
|
fontWeight: typography.fontWeight.bold,
|
|
},
|
|
|
|
favoriteButton: {
|
|
position: 'absolute',
|
|
top: 10,
|
|
right: 10,
|
|
width: 32,
|
|
height: 32,
|
|
borderRadius: 16,
|
|
backgroundColor: 'rgba(255,255,255,0.92)',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
},
|
|
favoriteIcon: {
|
|
fontSize: 15,
|
|
},
|
|
|
|
// ---------- Body ----------
|
|
body: {
|
|
padding: 14,
|
|
},
|
|
topRow: {
|
|
flexDirection: 'row',
|
|
justifyContent: 'space-between',
|
|
alignItems: 'flex-start',
|
|
},
|
|
name: {
|
|
fontSize: typography.fontSize.md,
|
|
fontWeight: typography.fontWeight.bold,
|
|
color: colors.text,
|
|
flex: 1,
|
|
marginRight: 8,
|
|
},
|
|
ratingPill: {
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
backgroundColor: colors.primaryMuted ?? '#E9F7EF',
|
|
borderRadius: 8,
|
|
paddingHorizontal: 6,
|
|
paddingVertical: 3,
|
|
},
|
|
ratingStar: {
|
|
fontSize: 11,
|
|
marginRight: 3,
|
|
},
|
|
ratingText: {
|
|
fontSize: typography.fontSize.xs,
|
|
fontWeight: typography.fontWeight.bold,
|
|
color: colors.primary,
|
|
},
|
|
|
|
metaRow: {
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
marginTop: 8,
|
|
},
|
|
metaText: {
|
|
fontSize: typography.fontSize.sm,
|
|
color: colors.textSecondary,
|
|
},
|
|
metaDivider: {
|
|
width: 3,
|
|
height: 3,
|
|
borderRadius: 1.5,
|
|
backgroundColor: colors.textSecondary,
|
|
marginHorizontal: 8,
|
|
opacity: 0.5,
|
|
},
|
|
|
|
tagPill: {
|
|
alignSelf: 'flex-start',
|
|
backgroundColor: colors.background,
|
|
borderRadius: 6,
|
|
paddingHorizontal: 8,
|
|
paddingVertical: 3,
|
|
marginTop: 10,
|
|
borderWidth: 1,
|
|
borderColor: colors.border,
|
|
},
|
|
tagPillText: {
|
|
fontSize: typography.fontSize.xs,
|
|
color: colors.textSecondary,
|
|
fontWeight: typography.fontWeight.medium,
|
|
},
|
|
});
|