mango-v4-ui/components/shared/ContentBox.tsx

28 lines
559 B
TypeScript
Raw Normal View History

2022-06-21 03:58:57 -07:00
type ContentBoxProps = {
children: React.ReactNode
2022-07-05 20:37:49 -07:00
className?: string
showBackground?: boolean
hideBorder?: boolean
hidePadding?: boolean
2022-06-21 03:58:57 -07:00
}
const ContentBox = ({
children,
className = '',
showBackground = false,
hideBorder = false,
hidePadding = false,
}: ContentBoxProps) => {
2022-07-05 20:37:49 -07:00
return (
2022-07-12 19:02:36 -07:00
<div
2022-07-15 05:50:29 -07:00
className={`rounded-lg ${hideBorder ? '' : 'border border-th-bkg-3'} ${
showBackground ? 'bg-th-bkg-2' : ''
2022-07-15 05:50:29 -07:00
} ${hidePadding ? '' : 'p-6'} ${className}`}
2022-07-12 19:02:36 -07:00
>
{children}
</div>
2022-07-05 20:37:49 -07:00
)
2022-06-21 03:58:57 -07:00
}
export default ContentBox