mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-07-31 07:25:21 -04:00
26 lines
596 B
TypeScript
26 lines
596 B
TypeScript
import type { ReactNode } from "react";
|
|
|
|
import styles from "./List.module.css";
|
|
|
|
type Props = {
|
|
children: ReactNode;
|
|
};
|
|
|
|
export const UnorderedList = ({ children, ...rest }: Props) => (
|
|
<ul className={styles.unordered} {...rest}>
|
|
{children}
|
|
</ul>
|
|
);
|
|
export const OrderedList = ({ children, ...rest }: Props) => (
|
|
<ol className={styles.ordered} {...rest}>
|
|
{children}
|
|
</ol>
|
|
);
|
|
|
|
// TODO: this is based on good faith that the children are all `<li>`s...
|
|
export const ListItem = ({ children, ...rest }: Props) => (
|
|
<li className={styles.item} {...rest}>
|
|
{children}
|
|
</li>
|
|
);
|