mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
Fix infobox with ID [ci skip]
This commit is contained in:
parent
02b69dd0d5
commit
a9da33c4d9
|
@ -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 (
|
||||
<>
|
||||
<Wrapper>
|
||||
{id && <a id={id} />}
|
||||
<aside className={infoboxClassNames}>
|
||||
{title && (
|
||||
|
@ -40,7 +41,7 @@ export default function Infobox({
|
|||
)}
|
||||
{children}
|
||||
</aside>
|
||||
</>
|
||||
</Wrapper>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user