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

clean up type definitions

This commit is contained in:
2022-01-30 22:04:25 -05:00
parent f0259dbab5
commit 7a3ea4924c
7 changed files with 13 additions and 23 deletions

View File

@@ -1,20 +1,16 @@
import classNames from "classnames";
import type { PropsWithChildren } from "react";
import type { HTMLAttributes } from "react";
import styles from "./List.module.css";
type Props = PropsWithChildren<{
className?: string;
}>;
export const UnorderedList = ({ className, ...rest }: Props) => (
export const UnorderedList = ({ className, ...rest }: HTMLAttributes<HTMLUListElement>) => (
<ul className={classNames(styles.unordered, className)} {...rest} />
);
export const OrderedList = ({ className, ...rest }: Props) => (
export const OrderedList = ({ className, ...rest }: HTMLAttributes<HTMLOListElement>) => (
<ol className={classNames(styles.ordered, className)} {...rest} />
);
// TODO: this is based on good faith that the children are all `<li>`s...
export const ListItem = ({ className, ...rest }: Props) => (
export const ListItem = ({ className, ...rest }: HTMLAttributes<HTMLLIElement>) => (
<li className={classNames(styles.item, className)} {...rest} />
);