frontend: make badge stylezable
Parents:
41f25ec1 file(s) changed
- frontend/components/ui/Badge.tsx +2 -2
frontend/components/ui/Badge.tsx
@@ -18,7 +18,7 @@ };
18 18
19 19 // TODO: Add a subtle variant and allow to drop the dot as well
20 20 // TODO: Experiment with a less round-ish version?
21 - export const Badge = ({ label, variant = "green" }) => {
21 + export const Badge = ({ label, variant = "green", style }) => {
22 22 const palette = badgeVariants[variant] ?? badgeVariants.green;
23 23
24 24 const styles = StyleSheet.create({
@@ -44,7 +44,7 @@ }
44 44 });
45 45
46 46 return (
47 - <View style={[styles.badge, { backgroundColor: palette.bg }]}>
47 + <View style={[styles.badge, { backgroundColor: palette.bg }, style]}>
48 48 <View style={[styles.badgeDot, { backgroundColor: palette.dot }]} />
49 49 <Text style={[styles.badgeText, { color: palette.text }]}>{label}</Text>
50 50 </View>