Merge pull request #44 from buddhist-uni/noselect

Fix #42 - Add no-select to buttons
This commit is contained in:
Hannah Park 2022-01-23 19:40:55 -05:00 committed by GitHub
commit b34edbde7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -154,7 +154,7 @@ function App() {
<button
type="button"
className="mx-auto mt-8 flex items-center px-2.5 py-1.5 border border-transparent text-xs font-medium rounded text-indigo-700 bg-indigo-100 hover:bg-indigo-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
className="mx-auto mt-8 flex items-center px-2.5 py-1.5 border border-transparent text-xs font-medium rounded text-indigo-700 bg-indigo-100 hover:bg-indigo-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 select-none"
onClick={() => setIsAboutModalOpen(true)}
>
About this game

View file

@ -19,7 +19,7 @@ export const Key = ({
onClick,
}: Props) => {
const classes = classnames(
'flex items-center justify-center rounded mx-0.5 text-xs font-bold cursor-pointer',
'flex items-center justify-center rounded mx-0.5 text-xs font-bold cursor-pointer select-none',
{
'bg-slate-200 hover:bg-slate-300 active:bg-slate-400': !status,
'bg-slate-400 text-white': status === 'absent',
@ -31,12 +31,12 @@ export const Key = ({
)
return (
<div
<button
style={{ width: `${width}px`, height: '58px' }}
className={classes}
onClick={() => onClick(value)}
>
{children || value}
</div>
</button>
)
}