Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "components/dropdown.d"

Index

Type aliases

IDropdownTypes

IDropdownTypes: { Danger: number; Info: number; Primary: number; Secondary: number; Success: number; Warning: number }

Dropdown Types

Type declaration

  • Danger: number
  • Info: number
  • Primary: number
  • Secondary: number
  • Success: number
  • Warning: number

Variables

Const Dropdown

Dropdown: (props: IDropdownProps) => IDropdown
import { Components } from "gd-sprest-bs";

// Create the dropdown
let el = document.querySelector("#dropdown");
let dropdown = Components.Dropdown({
    el: el,
    label: "Select a Choice",
    items: [
        { text: "Choice 1", value: "1" },
        { text: "Choice 2", value: "2" },
        { text: "Choice 3", value: "3" },
        { text: "Choice 4", value: "4" },
        { text: "Choice 5", value: "5" }
    ],
    onChange: (item, ev) => {
        console.log("The selected value is: " + item.text);
    }
});

Type declaration

Const DropdownTypes

DropdownTypes: IDropdownTypes

Dropdown Types

Generated using TypeDoc