Concepts
OverviewCompositionTestingLayout
Aspect RatioBleedBoxCenterContainerDividerFlexFloatGridLink OverlayScrollableStackWrapComponents
AccordionAdmonitionAvatarButtonCheckboxComboboxConfirm ModalCTAModalDate PickerDialogFieldFieldsetFile UploaderIcon ButtonInputLoading StatesMenuNotificationsProgressPrompt ModalRadioRatingSelectSwitchTableTabsTagTextTextareaToggleTooltipUtilities
Feature FlagsForLocal StoragePortalShowsplitPropsTheme1import { Show } from '@cerberus/react'
Usage
The Show component takes a when
prop that determines whether the children or the fallback
content should be rendered. If when
is true, the children are rendered. If when
is false, the fallback
content is rendered.
You are not allowed to enter!
API
export interface ShowProps { when: boolean | null | undefined fallback?: ReactNode}
define function Show(props: ShowProps): ReactNode | null
Props
The Show
component accepts the following props:
Name | Default | Description |
---|---|---|
when | false | The condition to evalue for showing the children or fallback. |
fallback | null | The content to render when the condition is false. |
On this page