( type: "text" | "number" | "color" | "checkbox" | "date" | "time" = "text", placeholder?: string, value?: string )
| 544 | * Creates a simple input element with card styling |
| 545 | */ |
| 546 | export function createCardInput( |
| 547 | type: "text" | "number" | "color" | "checkbox" | "date" | "time" = "text", |
| 548 | placeholder?: string, |
| 549 | value?: string |
| 550 | ): HTMLInputElement { |
| 551 | const input = activeDocument.createElement("input"); |
| 552 | input.type = type; |
| 553 | input.addClass("tasknotes-settings__card-input"); |
| 554 | |
| 555 | if (placeholder) { |
| 556 | input.placeholder = placeholder; |
| 557 | } |
| 558 | |
| 559 | if (value) { |
| 560 | input.value = value; |
| 561 | } |
| 562 | |
| 563 | return input; |
| 564 | } |
| 565 | |
| 566 | const THEME_COLOR_DATALIST_ID = "tasknotes-theme-color-options"; |
| 567 | const THEME_COLOR_NATIVE_PICKER_CLASS = "tasknotes-theme-color-picker"; |
no test coverage detected