mirror of
https://github.com/meshtastic/meshtastic.git
synced 2024-11-10 07:34:11 -08:00
Simpler card tag badges
This commit is contained in:
parent
118b5be7bb
commit
1fa41e7d52
|
@ -8,38 +8,22 @@ export interface CardTagsProps {
|
||||||
|
|
||||||
export const CardTags = ({ tags }: CardTagsProps) => {
|
export const CardTags = ({ tags }: CardTagsProps) => {
|
||||||
return (
|
return (
|
||||||
<ul className="pills">
|
<div>
|
||||||
{tags.map(({ color, description, label }, index) => {
|
{tags.map(({ color, label }, index) => {
|
||||||
return (
|
return (
|
||||||
<li
|
<span
|
||||||
|
className="badge"
|
||||||
key={index}
|
key={index}
|
||||||
style={{
|
style={{
|
||||||
display: "inline-flex",
|
backgroundColor: color,
|
||||||
alignItems: "center",
|
marginRight: "0.3rem",
|
||||||
alignContent: "center",
|
|
||||||
gap: "0.3rem",
|
|
||||||
fontSize: "0.6rem",
|
|
||||||
lineHeight: "1rem",
|
|
||||||
cursor: "default",
|
|
||||||
userSelect: "none",
|
userSelect: "none",
|
||||||
padding: "0.2rem",
|
|
||||||
border: "2px solid gray",
|
|
||||||
}}
|
}}
|
||||||
className="pills__item"
|
|
||||||
title={description}
|
|
||||||
>
|
>
|
||||||
<span>{label.toLowerCase()}</span>
|
{label}
|
||||||
<span
|
</span>
|
||||||
style={{
|
|
||||||
backgroundColor: color,
|
|
||||||
width: "0.5rem",
|
|
||||||
height: "0.5rem",
|
|
||||||
borderRadius: "50%",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</li>
|
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</ul>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue