mirror of
https://github.com/danbulant/dribbblish-dynamic-theme
synced 2026-05-27 05:51:55 +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);
|
if (options.data.max != null && val > options.data.max) this.set(options.key, options.data.max);
|
||||||
|
|
||||||
const input = /* html */ `
|
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 });
|
this.addInputHTML({ ...options, input });
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,32 +43,26 @@ DribbblishShared.config.register({
|
||||||
|
|
||||||
DribbblishShared.config.register({
|
DribbblishShared.config.register({
|
||||||
area: "Sidebar",
|
area: "Sidebar",
|
||||||
type: "slider",
|
type: "number",
|
||||||
key: "sidebarGapLeft",
|
key: "sidebarGapLeft",
|
||||||
name: "Left Sidebar Gap Size",
|
name: "Left Sidebar Gap Size",
|
||||||
description: "Set gap size between sidebar icons (in pixels).",
|
description: "Set gap size between sidebar icons (in pixels).",
|
||||||
defaultValue: 5,
|
defaultValue: 5,
|
||||||
data: {
|
data: {
|
||||||
min: 0,
|
min: 0
|
||||||
max: 100,
|
|
||||||
step: 1,
|
|
||||||
suffix: "px"
|
|
||||||
},
|
},
|
||||||
onChange: (val) => $("html").css("--sidebar-gap-left", `${val}px`)
|
onChange: (val) => $("html").css("--sidebar-gap-left", `${val}px`)
|
||||||
});
|
});
|
||||||
|
|
||||||
DribbblishShared.config.register({
|
DribbblishShared.config.register({
|
||||||
area: "Sidebar",
|
area: "Sidebar",
|
||||||
type: "slider",
|
type: "number",
|
||||||
key: "sidebarGapRight",
|
key: "sidebarGapRight",
|
||||||
name: "Right Sidebar Gap Size",
|
name: "Right Sidebar Gap Size",
|
||||||
description: "Set gap size between sidebar icons (in pixels).",
|
description: "Set gap size between sidebar icons (in pixels).",
|
||||||
defaultValue: 32,
|
defaultValue: 32,
|
||||||
data: {
|
data: {
|
||||||
min: 0,
|
min: 0
|
||||||
max: 100,
|
|
||||||
step: 1,
|
|
||||||
suffix: "px"
|
|
||||||
},
|
},
|
||||||
onChange: (val) => $("html").css("--sidebar-gap-right", `${val}px`)
|
onChange: (val) => $("html").css("--sidebar-gap-right", `${val}px`)
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue