@consumidor-positivo/ts-utils - v1.34.0
    Preparing search index...

    Function Conditional

    • Renders content based on a boolean condition.

      Parameters

      • __namedParameters: ConditionalProps

      Returns ReactNode

      The appropriate content based on the condition

      Simple conditional renderer using renderIf/renderElse props. Prefer the If/IfElse components for new code — this component exists for backwards compatibility.

      import { Conditional } from '@consumidor-positivo/ts-utils/react';

      <Conditional
      condition={isLoggedIn}
      renderIf={<Dashboard />}
      renderElse={<Login />}
      />