buzzword-bingo/src/app/components/bingoitem.tsx

15 lines
339 B
TypeScript
Raw Normal View History

2023-11-03 03:41:08 +01:00
import clsx from 'clsx'
import React from 'react'
2023-11-02 23:08:51 +01:00
2023-11-02 23:38:12 +01:00
interface Props{
text: string;
}
export default function BingoItem({text}: Props){
2023-11-03 03:41:08 +01:00
const [clicked, setClicked] = React.useState(false);
2023-11-02 23:08:51 +01:00
return(
2023-11-04 19:15:20 +01:00
<td><a className={clsx("btn btn-ghost w-full", {"bg-primary-focus":clicked})} onClick={() => setClicked(!clicked)}>{text}</a></td>
2023-11-02 23:08:51 +01:00
);
}