-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
55 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
import { HexColorPicker } from "react-colorful"; | ||
import { settings } from "@utils/settingsStorage"; | ||
import styles from "./index.module.css"; | ||
import "./bgcolor.css"; | ||
import * as ls from "@utils/localStorage"; | ||
|
||
export const BGColor = () => { | ||
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => { | ||
ls.set("background", event.target.value); | ||
const handlePickerChange = (color: string) => { | ||
ls.set("background", color); | ||
}; | ||
|
||
return ( | ||
<input | ||
type="color" | ||
defaultValue={settings.getCache("background")} | ||
onChange={handleChange} | ||
className={styles.settingValue} | ||
<HexColorPicker | ||
color={settings.getCache("background")} | ||
onChange={handlePickerChange} | ||
/> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.react-colorful { | ||
height: 95px !important; | ||
width: 30% !important; | ||
} | ||
|
||
.react-colorful__saturation { | ||
height: 80px !important; | ||
border-radius: 0px 10px 0px 0px !important; | ||
} | ||
|
||
.react-colorful__hue { | ||
height: 15px !important; | ||
border-radius: 0px 0px 10px 0px !important; | ||
} | ||
|
||
.react-colorful__pointer { | ||
border: 2px solid white !important; | ||
width: 15px !important; | ||
height: 15px !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters