import cn from 'classnames';
import React, { FC } from 'react';
import { View, Text } from 'react-native';

type props = {
  items: string[];
  classNames?: string;
};

const TagGroup: FC<props> = ({ items, classNames }) => (
  <View className={cn(classNames, 'flex-row flex-wrap')}>
    {items.map((item, index) => (
      <View key={index} className="m-1 rounded bg-secondary-bg px-2 py-1">
        <Text className="text-sm text-primary">{item}</Text>
      </View>
    ))}
  </View>
);

export default TagGroup;
