1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-17 07:45:32 -04:00

CSS modules ➡️ Stitches 🧵 (#799)

This commit is contained in:
2022-03-03 09:18:26 -05:00
committed by GitHub
parent ac7ac71c10
commit c2dde042b7
93 changed files with 2392 additions and 3000 deletions

View File

@@ -1,15 +1,13 @@
import classNames from "classnames";
import { styled, css } from "../../lib/styles/stitches.config";
import styles from "./List.module.css";
const ListStyles = css({
marginLeft: "1.5em",
paddingLeft: 0,
});
export const UnorderedList = ({ className, ...rest }: JSX.IntrinsicElements["ul"]) => (
<ul className={classNames(styles.unordered, className)} {...rest} />
);
export const OrderedList = ({ className, ...rest }: JSX.IntrinsicElements["ol"]) => (
<ol className={classNames(styles.ordered, className)} {...rest} />
);
export const UnorderedList = styled("ul", ListStyles);
export const OrderedList = styled("ol", ListStyles);
// TODO: this is based on good faith that the children are all `<li>`s...
export const ListItem = ({ className, ...rest }: JSX.IntrinsicElements["li"]) => (
<li className={classNames(styles.item, className)} {...rest} />
);
export const ListItem = styled("li", {
paddingLeft: "0.25em",
});