mirror of
https://github.com/danbulant/dribbblish-dynamic-theme
synced 2026-05-24 12:35:05 +00:00
change sidebar gap inputs to type number
This commit is contained in:
parent
9a47d3bbfc
commit
fffb05ff46
2 changed files with 12 additions and 11 deletions
|
|
@ -204,7 +204,14 @@ export default class ConfigMenu {
|
|||
if (options.data.max != null && val > options.data.max) this.set(options.key, options.data.max);
|
||||
|
||||
const input = /* html */ `
|
||||
<input type="number" id="dribbblish-config-input-${options.key}" value="${this.get(options.key)}">
|
||||
<input
|
||||
type="number"
|
||||
id="dribbblish-config-input-${options.key}"
|
||||
${options.data.min != null ? `min="${options.data.min}"` : ""}
|
||||
${options.data.max != null ? `max="${options.data.max}"` : ""}
|
||||
step="${options.data.step ?? 1}"
|
||||
value="${this.get(options.key)}"
|
||||
>
|
||||
`;
|
||||
this.addInputHTML({ ...options, input });
|
||||
|
||||
|
|
|
|||
|
|
@ -43,32 +43,26 @@ DribbblishShared.config.register({
|
|||
|
||||
DribbblishShared.config.register({
|
||||
area: "Sidebar",
|
||||
type: "slider",
|
||||
type: "number",
|
||||
key: "sidebarGapLeft",
|
||||
name: "Left Sidebar Gap Size",
|
||||
description: "Set gap size between sidebar icons (in pixels).",
|
||||
defaultValue: 5,
|
||||
data: {
|
||||
min: 0,
|
||||
max: 100,
|
||||
step: 1,
|
||||
suffix: "px"
|
||||
min: 0
|
||||
},
|
||||
onChange: (val) => $("html").css("--sidebar-gap-left", `${val}px`)
|
||||
});
|
||||
|
||||
DribbblishShared.config.register({
|
||||
area: "Sidebar",
|
||||
type: "slider",
|
||||
type: "number",
|
||||
key: "sidebarGapRight",
|
||||
name: "Right Sidebar Gap Size",
|
||||
description: "Set gap size between sidebar icons (in pixels).",
|
||||
defaultValue: 32,
|
||||
data: {
|
||||
min: 0,
|
||||
max: 100,
|
||||
step: 1,
|
||||
suffix: "px"
|
||||
min: 0
|
||||
},
|
||||
onChange: (val) => $("html").css("--sidebar-gap-right", `${val}px`)
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue