feat: begin support for components and dark mode

This commit is contained in:
Aarnav Tale
2024-03-29 15:41:10 -04:00
parent abb957c573
commit b5658750a9
12 changed files with 195 additions and 89 deletions
+25
View File
@@ -0,0 +1,25 @@
import clsx from 'clsx'
import { type HTMLProps } from 'react'
type Properties = HTMLProps<HTMLButtonElement> & {
readonly isDestructive?: boolean;
readonly isDisabled?: boolean;
}
export default function Action(properties: Properties) {
return (
<button
{...properties}
type='button'
className={clsx(
properties.className,
properties.isDisabled && 'opacity-50 cursor-not-allowed',
properties.isDestructive
? 'text-red-700 dark:text-red-500'
: 'text-blue-700 dark:text-blue-400'
)}
>
{properties.children}
</button>
)
}