31 lines
794 B
TypeScript
31 lines
794 B
TypeScript
import { StyleSheet } from 'react-native';
|
|
import { typography } from '@theme';
|
|
|
|
const variantColors = {
|
|
primary: { bg: '#E8F5E9', text: '#05824C' },
|
|
success: { bg: '#E8F5E9', text: '#2E7D32' },
|
|
warning: { bg: '#FFF8E1', text: '#F57F17' },
|
|
danger: { bg: '#FFE7E7', text: '#D32F2F' },
|
|
};
|
|
|
|
export const getStyles = () => StyleSheet.create({
|
|
badge: {
|
|
paddingHorizontal: 8,
|
|
paddingVertical: 3,
|
|
borderRadius: 12,
|
|
alignSelf: 'flex-start',
|
|
},
|
|
text: {
|
|
fontSize: typography.fontSize.xs,
|
|
fontWeight: typography.fontWeight.semibold,
|
|
},
|
|
});
|
|
|
|
export const getVariantStyle = (_colors: any, variant: string) => {
|
|
const v = variantColors[variant as keyof typeof variantColors] || variantColors.primary;
|
|
return {
|
|
backgroundColor: v.bg,
|
|
color: v.text,
|
|
};
|
|
};
|