fix(web): dark mode text color fixes

fixes #544
This commit is contained in:
Paul Armstrong
2021-01-19 08:44:18 -08:00
committed by Blake Blackshear
parent cb4a0aa594
commit 2da50cc538
11 changed files with 273 additions and 179 deletions

View File

@@ -0,0 +1,16 @@
import { h } from 'preact';
export default function Box({ children, className = '', hover = false, href, ...props }) {
const Element = href ? 'a' : 'div';
return (
<Element
className={`bg-white dark:bg-gray-700 shadow-lg rounded-lg p-4 ${
hover ? 'hover:bg-gray-300 hover:dark:bg-gray-500 dark:hover:text-gray-900 dark:hover:text-gray-900' : ''
} ${className}`}
href={href}
{...props}
>
{children}
</Element>
);
}