diff --git a/src/Settings.tsx b/src/Settings.tsx index f6f5403..fd261e1 100644 --- a/src/Settings.tsx +++ b/src/Settings.tsx @@ -1,5 +1,7 @@ import { createSignal } from "solid-js"; import { Temporal } from "temporal-polyfill"; +import FONT_FAMILY from "./font"; +import getDarkMode from "./dark-signal"; export default ({ onBirthDay, @@ -7,11 +9,41 @@ export default ({ onBirthDay: (birthDay: Temporal.PlainDate | null) => void; }) => { const [date, setDate] = createSignal(null); + const colorLabel = () => (getDarkMode() ? "#b9b3aa" : "#b0b5b9"); + const colorCounter = () => (getDarkMode() ? "#bab4ab" : "#494949"); + const colorBackground = () => (getDarkMode() ? "#181a1b" : "#ffffff"); + return ( -
+
+ { if (e.key === "Enter") { const inputDate = date(); @@ -33,6 +65,23 @@ export default ({ } onBirthDay(inputDate); }} + style={{ + padding: "10px 20px", + "font-size": "16px", + "font-weight": "bold", + "border-radius": "4px", + border: "none", + "background-color": colorCounter(), + color: colorBackground(), + cursor: "pointer", + transition: "background-color 0.2s ease", + }} + onMouseOver={(e) => { + e.currentTarget.style.backgroundColor = colorCounter(); + }} + onMouseOut={(e) => { + e.currentTarget.style.backgroundColor = colorLabel(); + }} > Motivate