1
Fork 0
mirror of https://github.com/Steffo99/unisteffo.git synced 2025-04-01 05:10:43 +00:00
triennale-appunti-steffo/src/components/Box.js
2021-03-25 17:55:03 +01:00

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,
}