FormElements
import {
useState,
FormCheckbox, FormDropdownList, FormFileUploadButton, FormGroup, FormRadioGroup, FormTextArea,
FormTextBox, FormToggle, Slider, RawHtml, LoadingSpinner, Icon,
} from "trilium:preact";
export default function FormElements() {
const [ checkboxChecked, setCheckboxChecked ] = useState(false);
const [ dropdownValue, setDropdownValue ] = useState("key-1");
const [ radioGroupValue, setRadioGroupValue ] = useState("key-1");
const [ sliderValue, setSliderValue ] = useState(50);
return (
<>
Form elements#
{}}
/>
{}}
/>
{
const file = files?.[0];
if (!file) return;
showMessage(`Got file "${file.name}" of size ${file.size} B and type ${file.type}.`);
}}
/>
>
)
}