-
Notifications
You must be signed in to change notification settings - Fork 0
/
List.tsx
38 lines (31 loc) · 958 Bytes
/
List.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
32
33
34
35
36
37
38
import * as React from 'react';
import Container from './Container';
import Paragraph from './Paragraph';
const Unordered = (props: React.HTMLProps<HTMLUListElement>) => (
<ul className={`px-8 list-disc sm:px-0 ${props.className}`}>
{props.children}
</ul>
);
const UnorderedStyledNone = (props: React.HTMLProps<HTMLUListElement>) => (
<ul className={`px-0 list-none ${props.className}`}>{props.children}</ul>
);
const Item = (props: React.HTMLProps<HTMLDivElement>) => (
<li className="text-lg py-2">{props.children}</li>
);
interface ItemIconProps extends React.HTMLProps<HTMLDivElement> {
icon: JSX.Element;
}
const ItemIcon = (props: ItemIconProps) => (
<li className="text-lg py-2">
<Container.FlexRow className="items-center gap-4">
{props.icon}
<Paragraph.Default>{props.children}</Paragraph.Default>
</Container.FlexRow>
</li>
);
export default {
Item,
ItemIcon,
Unordered,
UnorderedStyledNone,
};