mirror of https://github.com/logseq/logseq
improve(plugin): support textarea for settings input item
parent
a14b397899
commit
3e7c20fd80
|
@ -232,7 +232,7 @@ export type SettingSchemaDesc = {
|
|||
default: string | number | boolean | Array<any> | object | null
|
||||
title: string
|
||||
description: string // support markdown
|
||||
inputAs?: 'color' | 'date' | 'datetime-local' | 'range'
|
||||
inputAs?: 'color' | 'date' | 'datetime-local' | 'range' | 'textarea'
|
||||
enumChoices?: Array<string>
|
||||
enumPicker?: 'select' | 'radio' | 'checkbox' // default: select
|
||||
}
|
||||
|
|
|
@ -545,7 +545,12 @@
|
|||
|
||||
.form-input {
|
||||
padding: 5px;
|
||||
width: 50%;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
textarea.form-input {
|
||||
overflow-y: auto;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
.form-select {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
(let [input-as (util/safe-lower-case (or inputAs (name type)))
|
||||
input-as (if (= input-as "string") :text (keyword input-as))]
|
||||
[:input
|
||||
[(if (= input-as :textarea) :textarea :input)
|
||||
{:class (util/classnames [{:form-input (not (contains? #{:color :range} input-as))}])
|
||||
:type (name input-as)
|
||||
:defaultValue (or val default)
|
||||
|
|
Loading…
Reference in New Issue