-- DreamStack Select Component
-- Option selector displayed as button group

export component Select(value, label, opt1, opt2, opt3, onSelect1, onSelect2, onSelect3) =
  column [
    when label -> text label { variant: "label" }
    row [
      button opt1 { click: onSelect1, variant: "secondary" }
      button opt2 { click: onSelect2, variant: "secondary" }
      when opt3 -> button opt3 { click: onSelect3, variant: "secondary" }
    ]
  ]
