/
index.tsx
31 lines (27 loc) · 927 Bytes
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"use client";
import * as React from "react";
import CircleSmall from "../../icons/CircleSmall";
import type { Props } from "./types";
const ListItem = ({ label, children, icon = <CircleSmall />, dataTest }: Props) => {
return (
<li
data-test={dataTest}
className="orbit-list-item font-base mb-xxs flex last:m-0 last-of-type:m-0"
>
{icon && (
<div className="orbit-list-item-icon me-xs [&>.orbit-carrier-logo]:h-icon-small [&>.orbit-carrier-logo]:w-icon-small [&>.orbit-carrier-logo>img]:h-icon-small [&>.orbit-carrier-logo>img]:w-icon-small flex flex-none items-center">
{icon}
</div>
)}
<span className="w-full">
{label && (
<div className="orbit-list-item-label font-base text-secondary-foreground font-normal">
{label}
</div>
)}
{children}
</span>
</li>
);
};
export default ListItem;