Const
Renders children only when condition is truthy. Shorthand for <IfElse> with only a <Then> block.
condition
<IfElse>
<Then>
import { If } from '@consumidor-positivo/ts-utils/react';<If condition={isLoggedIn}> <span>Welcome!</span></If> Copy
import { If } from '@consumidor-positivo/ts-utils/react';<If condition={isLoggedIn}> <span>Welcome!</span></If>
A boolean, number, string, null, undefined, or a function returning one of these
Content to render when condition is truthy
Renders children only when
conditionis truthy. Shorthand for<IfElse>with only a<Then>block.