Skip to content

Commit

Permalink
minor typing improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
onderonur committed Nov 2, 2024
1 parent 71ef76e commit 9d11be3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apps/demo/src/components/list.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { forwardRef } from 'react';

type ListProps = React.PropsWithChildren & {
type ListProps = {
direction?: 'vertical' | 'horizontal';
children: React.ReactNode;
};

export function List({ direction, ...rest }: ListProps) {
Expand All @@ -13,7 +14,9 @@ export function List({ direction, ...rest }: ListProps) {
);
}

type ListItemProps = React.PropsWithChildren;
type ListItemProps = {
children: React.ReactNode;
};

export const ListItem = forwardRef<React.ElementRef<'li'>, ListItemProps>(
function ListItem(props, ref) {
Expand Down

0 comments on commit 9d11be3

Please sign in to comment.