Skip to content

Commit

Permalink
fix: allow any children for List
Browse files Browse the repository at this point in the history
  • Loading branch information
jtiala committed Jul 31, 2023
1 parent 039fac5 commit e0e3de4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react/src/components/List/List.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CommonComponentProps, cn } from "@themeless-ui/utils";
import { ReactElement, createElement } from "react";
import { ReactElement, ReactNode, createElement } from "react";
import { ListItem, ListItemProps } from "./ListItem";

type ListType = "ordered" | "unordered";
Expand All @@ -16,7 +16,7 @@ export type ListProps = {
/**
* One or more <List.Item> elements.
*/
children?: ListItemElement | ListItemElement[];
children?: ListItemElement | ListItemElement[] | ReactNode; // ReactNode is needed for MDXComponents
} & CommonComponentProps;

const className = cn("list");
Expand Down

0 comments on commit e0e3de4

Please sign in to comment.