Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change position of buttons and change notes styling #13

Merged
merged 1 commit into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/screenshot-app-2024-08-25.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 15 additions & 10 deletions src/components/pages/Game/GameControls/GameControlActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,31 @@ class SudokuMenuControls extends React.Component<PropsFromRedux> {
return (
<div className="mt-4 grid w-full grid-cols-4 gap-2">
<ControlContainer>
<Button
onClick={() => (this.props.notesMode ? this.props.deactivateNotesMode() : this.props.activateNotesMode())}
className={clsx("w-full", {
"bg-teal-700 text-white": !this.props.notesMode,
"bg-sky-700 text-white": this.props.notesMode,
})}
>{`${this.props.notesMode ? "Notes ON" : "Notes OFF"}`}</Button>
<ConnectedUndoButton />
</ControlContainer>
<ControlContainer>
<Button className="w-full" onClick={() => this.props.clearCell(this.props.activeCell!)}>
{"Erase"}
</Button>
</ControlContainer>
<ControlContainer>
<Button className="w-full" onClick={() => this.props.getHint(this.props.activeCell!)}>
{"Hint"}
<Button
onClick={() => (this.props.notesMode ? this.props.deactivateNotesMode() : this.props.activateNotesMode())}
className={clsx("w-full relative")}
>
<div
className={clsx("absolute -bottom-4 left-1/2 -translate-x-1/2 rounded-full px-2 text-sm md:text-base", {
"bg-teal-700 text-white": !this.props.notesMode,
"bg-sky-700 text-white": this.props.notesMode,
})}
>{`${this.props.notesMode ? "ON" : "OFF"}`}</div>
<div>{"Notes"}</div>
</Button>
</ControlContainer>
<ControlContainer>
<ConnectedUndoButton />
<Button className="w-full" onClick={() => this.props.getHint(this.props.activeCell!)}>
{"Hint"}
</Button>
</ControlContainer>
</div>
);
Expand Down
Loading