Skip to main content
Deno 2 is finally here πŸŽ‰οΈ
Learn more
Module

x/lunchbox/components/Select/setup.ts>iOption

Component Library 🍱 for Deno πŸ¦• Fresh πŸ‹
Latest
type alias iOption
import { type iOption } from "https://deno.land/x/lunchbox@v1.0.2/components/Select/setup.ts";

This type simplifies the usage of <option/> elements inside the component. There are three degrees of fineness of configuration:

  • string: Appends a <option value={string}>{string}</option> element.
  • value/name pair: Appends a <option value={value}>{name}</option> element.
  • <option/> element: Appends the element as it is.
definition: string | { value: string; name: string; } | iComponent<HTMLOptionElement>