hedgedoc/src/components/common/show-if/show-if.tsx
Renovate Bot 77a60c6c48 Switch the base framework from Create React App to Next.JS
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-12-30 14:43:25 +01:00

15 lines
362 B
TypeScript

/*
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import React, { Fragment } from 'react'
export interface ShowIfProps {
condition: boolean
}
export const ShowIf: React.FC<ShowIfProps> = ({ children, condition }) => {
return condition ? <Fragment>{children}</Fragment> : null
}