Add tag datatable

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2023-07-14 19:35:07 +03:00
parent 498c3e77cc
commit 1e36e01ea1
16 changed files with 197 additions and 96 deletions

View File

@@ -0,0 +1,27 @@
import React from 'react';
import { getContrastColor } from '../utilities';
import { Chip } from 'react-native-paper';
import { Tag } from '../database';
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
const TagChip = (properties: { tag: Tag }) => {
const contrastColor = getContrastColor(properties.tag.color);
return (
<Chip
icon={() => {
return <FontAwesome5 name="tag" color={contrastColor} />;
}}
compact
style={[
{
backgroundColor: properties.tag.color,
},
]}
textStyle={{ color: contrastColor }}>
{'#' + properties.tag.name}
</Chip>
);
};
export default TagChip;