import styles from './NetworkSelect.module.css'

interface Props {
  label: string
  value: string
  onChange: (v: string) => void
  options: string[]
}

export function NetworkSelect({ label, value, onChange, options }: Props) {
  return (
    <div className={styles.wrap}>
      <span className={styles.label}>{label}</span>
      <select
        className={styles.select}
        value={value}
        onChange={e => onChange(e.target.value)}
      >
        {options.map(n => (
          <option key={n} value={n}>{n}</option>
        ))}
      </select>
    </div>
  )
}
