Skip to content
Open
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,6 @@ function ThemeButton(props: { theme: ThemeWithName }): JSXElement {
}

function Picker(props: { color: ColorName }): JSXElement {
let colorInputRef: HTMLInputElement | undefined = undefined;

const text = () => {
if (props.color === "bg") return "background";
if (props.color === "main") return "main";
Expand Down Expand Up @@ -583,13 +581,12 @@ function Picker(props: { color: ColorName }): JSXElement {
updateThemeColor(props.color, value);
}}
/>
<div class="grid">
<div class="relative">
<input
ref={(el) => (colorInputRef = el)}
type="color"
value={getTheme()[props.color]}
onInput={debouncedInput}
class="pointer-events-none col-[1/1] row-[1/1] m-0 h-full w-0 p-0 opacity-0"
class="pointer-events-auto absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0"
Comment thread
d1rshan marked this conversation as resolved.
Outdated
Comment thread
d1rshan marked this conversation as resolved.
Outdated
// onChange={(e) => {
// const current = [...getConfig.customThemeColors];
// current[colorIndex()] = e.currentTarget.value;
Expand All @@ -601,7 +598,6 @@ function Picker(props: { color: ColorName }): JSXElement {
/>
<Button
class={cn(
`col-[1/1] row-[1/1]`,
`bg-(--picker-${props.color}) text-(--picker-bg)`,
`hover:bg-(--picker-text)`,
props.color === "bg" && "bg-(--picker-subAlt) text-(--picker-text)",
Expand All @@ -611,7 +607,6 @@ function Picker(props: { color: ColorName }): JSXElement {
icon: "fa-palette",
fixedWidth: true,
}}
onClick={() => colorInputRef?.click()}
/>
</div>
</div>
Expand Down
Loading