Skip to content

Documentation

Qian-Ye_Lin edited this page Mar 28, 2022 · 5 revisions

Welcome to the toshi-nest wiki!

SelectControl

The <SelectControl/> component allows users SINGLE SELECT from a list of options.

Screenshot from 2022-03-29 11-52-29

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
Clone this wiki locally