Skip to content

Commit

Permalink
feat: remove isValidElement filter to support rendering of all ReactN…
Browse files Browse the repository at this point in the history
…ode types
  • Loading branch information
metacode22 committed Sep 1, 2024
1 parent dc41563 commit fa3e052
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react/react/src/components/Separated/Separated.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @tossdocs-ignore */
/** @jsxImportSource react */
import { Children, Fragment, isValidElement, PropsWithChildren, ReactNode } from 'react';
import { Children, Fragment, PropsWithChildren, ReactNode } from 'react';

interface Props extends PropsWithChildren {
with: ReactNode;
Expand All @@ -9,7 +9,7 @@ interface Props extends PropsWithChildren {
}

export function Separated({ children, with: separator, first = false, last = false }: Props) {
const childrenArray = Children.toArray(children).filter(isValidElement);
const childrenArray = Children.toArray(children);
const childrenLength = childrenArray.length;

return (
Expand Down

0 comments on commit fa3e052

Please sign in to comment.