refactor(web): camera view + bugfixes

This commit is contained in:
Paul Armstrong
2021-02-04 15:19:47 -08:00
committed by Blake Blackshear
parent b422a83b57
commit 96f87caff0
15 changed files with 156 additions and 63 deletions

View File

@@ -6,6 +6,7 @@ export default function Box({
buttons = [],
className = '',
content,
elevated = true,
header,
href,
icons,
@@ -16,14 +17,16 @@ export default function Box({
}) {
const Element = href ? 'a' : 'div';
const typeClasses = elevated ? 'shadow-md hover:shadow-lg transition-shadow' : 'border border-gray-200';
return (
<div
className={`bg-white dark:bg-gray-800 shadow-md hover:shadow-lg transition-shadow rounded-lg overflow-hidden ${className}`}
>
<Element href={href} {...props}>
{media}
<div class="p-4 pb-2">{header ? <Heading size="base">{header}</Heading> : null}</div>
</Element>
<div className={`bg-white dark:bg-gray-800 rounded-lg overflow-hidden ${typeClasses} ${className}`}>
{media || header ? (
<Element href={href} {...props}>
{media}
<div class="p-4 pb-2">{header ? <Heading size="base">{header}</Heading> : null}</div>
</Element>
) : null}
{buttons.length || content ? (
<div class="pl-4 pb-2">
{content || null}