Minor cleanups
This commit is contained in:
parent
c9229ca2b8
commit
290b7051bc
|
@ -1,32 +0,0 @@
|
|||
export function Button(props: {
|
||||
className?: string
|
||||
onClick?: () => void
|
||||
color: 'green' | 'red' | 'deemphasized'
|
||||
hideFocusRing?: boolean
|
||||
children?: any
|
||||
}) {
|
||||
const { className, onClick, children, color, hideFocusRing } = props
|
||||
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
className={classNames(
|
||||
'inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white',
|
||||
!hideFocusRing && 'focus:outline-none focus:ring-2 focus:ring-offset-2',
|
||||
color === 'green' &&
|
||||
'bg-green-500 hover:bg-green-600 focus:ring-green-500',
|
||||
color === 'red' && 'bg-red-500 hover:bg-red-600 focus:ring-red-500',
|
||||
color === 'deemphasized' &&
|
||||
'bg-transparent hover:bg-gray-500 focus:ring-gray-400',
|
||||
className
|
||||
)}
|
||||
onClick={onClick}
|
||||
>
|
||||
{children}
|
||||
</button>
|
||||
)
|
||||
}
|
||||
|
||||
function classNames(...classes: any[]) {
|
||||
return classes.filter(Boolean).join(' ')
|
||||
}
|
|
@ -33,7 +33,7 @@ function ContractCard(props: { contract: Contract }) {
|
|||
</time>
|
||||
</p>
|
||||
<button
|
||||
className="btn btn-sm btn-error ml-2"
|
||||
className="btn btn-sm btn-error btn-outline ml-2"
|
||||
onClick={() => {
|
||||
deleteContract(contract.id)
|
||||
}}
|
||||
|
|
|
@ -17,7 +17,7 @@ export default function Account() {
|
|||
}, [user?.id])
|
||||
|
||||
return (
|
||||
<div className="relative overflow-hidden h-screen bg-cover bg-gray-900">
|
||||
<div>
|
||||
<Header />
|
||||
<div className="max-w-4xl my-20 mx-auto">
|
||||
<div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user