Skip to content

Commit

Permalink
[C] fix typings for ConditionalWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgoff committed Jan 18, 2024
1 parent a57f5dd commit edc6de0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/epo-react-lib/src/utils/ConditionalWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ interface ConditionalWrapperProps {

const ConditionalWrapper: FunctionComponent<
PropsWithChildren<ConditionalWrapperProps>
> = ({ condition, wrapper, children }) =>
condition ? wrapper(children) : children;
> = ({ condition, wrapper, children }) => (
<>{condition ? wrapper(children) : children}</>
);

ConditionalWrapper.displayName = "Util.ConditionalWrapper";

Expand Down

0 comments on commit edc6de0

Please sign in to comment.