Skip to content

Commit

Permalink
make settings better clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
karussell committed Nov 15, 2023
1 parent 4af4de6 commit 4a9cf44
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion src/sidebar/SettingsBox.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
display: flex;
flex-direction: column;
align-items: start;
gap: 0rem;
gap: 0;
margin: 0.2rem 0.5rem 1.5rem 0;
}

Expand Down Expand Up @@ -41,6 +41,15 @@
height: 2rem;
}

.settingsCheckbox label {
padding-left: 3px;
}

.settingsCheckbox:hover label,
.settingsCheckbox:hover input {
cursor: pointer;
}

.infoLine {
padding: 10px 2px 0 0;
display: flex;
Expand Down
8 changes: 4 additions & 4 deletions src/sidebar/SettingsBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { tr } from '@/translation/Translation'
import PlainButton from '@/PlainButton'
import OnIcon from '@/sidebar/toggle_on.svg'
import OffIcon from '@/sidebar/toggle_off.svg'
import { useContext } from 'react'
import { useContext, useState } from 'react'
import { SettingsContext } from '@/contexts/SettingsContext'

export default function SettingsBox() {
Expand Down Expand Up @@ -79,9 +79,9 @@ function SettingsToggle({ title, enabled, onClick }: { title: string; enabled: b

function SettingsCheckbox({ title, enabled, onClick }: { title: string; enabled: boolean; onClick: () => void }) {
return (
<div className={styles.settingsCheckbox}>
<input type="checkbox" checked={enabled} onClick={onClick}></input>
<label>{title}</label>
<div className={styles.settingsCheckbox} onClick={onClick}>
<input type="checkbox" checked={enabled}></input>
<label style={{ color: enabled ? '#5b616a' : 'gray' }}>{title}</label>
</div>
)
}

0 comments on commit 4a9cf44

Please sign in to comment.