Merge pull request #44 from buddhist-uni/noselect
Fix #42 - Add no-select to buttons
This commit is contained in:
commit
b34edbde7b
2 changed files with 4 additions and 4 deletions
|
@ -154,7 +154,7 @@ function App() {
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="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)}
|
onClick={() => setIsAboutModalOpen(true)}
|
||||||
>
|
>
|
||||||
About this game
|
About this game
|
||||||
|
|
|
@ -19,7 +19,7 @@ export const Key = ({
|
||||||
onClick,
|
onClick,
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
const classes = classnames(
|
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-200 hover:bg-slate-300 active:bg-slate-400': !status,
|
||||||
'bg-slate-400 text-white': status === 'absent',
|
'bg-slate-400 text-white': status === 'absent',
|
||||||
|
@ -31,12 +31,12 @@ export const Key = ({
|
||||||
)
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<button
|
||||||
style={{ width: `${width}px`, height: '58px' }}
|
style={{ width: `${width}px`, height: '58px' }}
|
||||||
className={classes}
|
className={classes}
|
||||||
onClick={() => onClick(value)}
|
onClick={() => onClick(value)}
|
||||||
>
|
>
|
||||||
{children || value}
|
{children || value}
|
||||||
</div>
|
</button>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue