-
Notifications
You must be signed in to change notification settings - Fork 1
Documentation
Qian-Ye_Lin edited this page Mar 28, 2022
·
5 revisions
Welcome to the toshi-nest wiki!
The <SelectControl/>
component allows users SINGLE SELECT from a list of options.
import React, { useState } from "react";
import { SelectControl } from "@gns-science/toshi-nest";
const SelectControlExample = () => {
const options = ["1", "2", "3"];
const [selection, setSelection] = useState(options[0]);
return (
<SelectControl options={options} setOptions={setSelection} name={"select control demo}/>
)
};
props
Prop | type |
---|---|
options | string[] |
setOptions | (selection: string) => void |
name | string |