Files
luggage-list/src/components/ChipGroup.js
Luna bdea52b7c6
Some checks failed
Luggage List Build / release (push) Has been cancelled
Luggage List Build / build-android (push) Has been cancelled
Luggage List Build / build-web (push) Has been cancelled
refactor: split app into modular src architecture
2026-04-18 12:56:12 +02:00

19 lines
597 B
JavaScript

import React from 'react';
import { Pressable, Text, View } from 'react-native';
import { styles } from '../styles';
export default function ChipGroup({ options, value, onChange }) {
return (
<View style={styles.chipGroup}>
{options.map((option) => {
const active = value === option;
return (
<Pressable key={option} style={[styles.chip, active && styles.chipActive]} onPress={() => onChange(option)}>
<Text style={[styles.chipText, active && styles.chipTextActive]}>{option}</Text>
</Pressable>
);
})}
</View>
);
}