mirror of
https://github.com/randyjc/Rahoot.git
synced 2026-03-13 20:15:35 +01:00
refactor: add typescript & pnpm workspace & docker file
This commit is contained in:
27
packages/web/src/components/AnswerButton.tsx
Normal file
27
packages/web/src/components/AnswerButton.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import clsx from "clsx"
|
||||
import { ButtonHTMLAttributes, ElementType, PropsWithChildren } from "react"
|
||||
|
||||
type Props = PropsWithChildren &
|
||||
ButtonHTMLAttributes<HTMLButtonElement> & {
|
||||
icon: ElementType
|
||||
}
|
||||
|
||||
export default function AnswerButton({
|
||||
className,
|
||||
icon: Icon,
|
||||
children,
|
||||
...otherProps
|
||||
}: Props) {
|
||||
return (
|
||||
<button
|
||||
className={clsx(
|
||||
"shadow-inset flex items-center gap-3 rounded px-4 py-6 text-left",
|
||||
className,
|
||||
)}
|
||||
{...otherProps}
|
||||
>
|
||||
<Icon className="h-6 w-6" />
|
||||
<span className="drop-shadow-md">{children}</span>
|
||||
</button>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user