1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-06-13 20:45:31 -04:00

even more styled components

This commit is contained in:
2022-01-20 08:26:30 -05:00
parent 171bdd65b6
commit 0462428a54
20 changed files with 332 additions and 221 deletions
+9
View File
@@ -0,0 +1,9 @@
.unordered,
.ordered {
margin-left: 1.5em;
padding-left: 0;
}
.item {
padding-left: 0.25em;
}
+25
View File
@@ -0,0 +1,25 @@
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>
);