mirror of
https://github.com/tale/headplane.git
synced 2026-09-03 10:48:17 +00:00
feat: begin support for components and dark mode
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user