Skip to content

Commit

Permalink
feat: πŸ’„ Labels for hierarchy input boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Aug 13, 2021
1 parent 815fc64 commit 0323edf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/BreadcrumbsSettingTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,23 @@ export class BreadcrumbsSettingTab extends PluginSettingTab {
values: userHierarchy = { up: ["↑"], same: ["β†’"], down: ["↓"] },
existing = false
) => {
const row = createDiv({ cls: "hierarchy-row" });
const row = createSpan({ cls: "hierarchy-row" });

const hierarchyNames = row.createSpan({});

hierarchyNames.createEl("label", { attr: { for: "up" }, text: "↑" });
const upInput = hierarchyNames.createEl("input", {
attr: { id: "up" },
value: values.up.join(", "),
});
hierarchyNames.createEl("label", { attr: { for: "same" }, text: "β†’" });
const sameInput = hierarchyNames.createEl("input", {
attr: { id: "same" },
value: values.same.join(", "),
});
hierarchyNames.createEl("label", { attr: { for: "down" }, text: "↓" });
const downInput = hierarchyNames.createEl("input", {
attr: { id: "down" },
value: values.down.join(", "),
});
let cleanInputs = [upInput.value, sameInput.value, downInput.value].map(
Expand Down

0 comments on commit 0323edf

Please sign in to comment.