mirror of
https://github.com/Steffo99/unisteffo.git
synced 2025-04-01 05:10:43 +00:00
24 lines
633 B
JavaScript
24 lines
633 B
JavaScript
import React from "react"
|
|
import { Box as BluelibBox, Title } from "bluelib/lib/components"
|
|
import PropTypes from "prop-types"
|
|
import classNames from "classnames"
|
|
import Style from "./Box.module.css"
|
|
|
|
|
|
export default function Box({ children, className, title, Type = BluelibBox, ...props }) {
|
|
return (
|
|
<Type className={classNames(Style.Panel, className)} {...props}>
|
|
{title ?
|
|
<Title size={"l"}>
|
|
{title}
|
|
</Title>
|
|
: null}
|
|
{children}
|
|
</Type>
|
|
)
|
|
}
|
|
|
|
Box.propTypes = {
|
|
children: PropTypes.node,
|
|
title: PropTypes.node,
|
|
}
|