From a9da33c4d97abb0e9a09795d2383b3be3a10a3e9 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Wed, 23 Sep 2020 13:00:56 +0200 Subject: [PATCH] Fix infobox with ID [ci skip] --- website/src/components/infobox.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/src/components/infobox.js b/website/src/components/infobox.js index b5a7af545..6df8426b8 100644 --- a/website/src/components/infobox.js +++ b/website/src/components/infobox.js @@ -1,4 +1,4 @@ -import React from 'react' +import React, { Fragment } from 'react' import PropTypes from 'prop-types' import classNames from 'classnames' @@ -14,13 +14,14 @@ export default function Infobox({ className, children, }) { + const Wrapper = id ? 'div' : Fragment const infoboxClassNames = classNames(classes.root, className, { [classes.list]: !!list, [classes.warning]: variant === 'warning', [classes.danger]: variant === 'danger', }) return ( - <> + {id && } - + ) }