UNPKG

zigbee2mqtt-windfront

Version:

[![Version](https://img.shields.io/npm/v/zigbee2mqtt-windfront.svg)](https://npmjs.org/package/zigbee2mqtt-windfront) [![CI](https://github.com/Nerivec/zigbee2mqtt-windfront/actions/workflows/ci.yml/badge.svg)](https://github.com/Nerivec/zigbee2mqtt-windf

2 lines (1 loc) 610 B
import{r as i,b as h,j as n}from"./index-Cg_dwqpD.js";import{S as v}from"./SelectField-dfeWrxvV.js";const j=i.memo(r=>{const{value:s,values:o,disabled:c,onChange:d,label:p,...u}=r,{t:a}=h("common"),l=o.size===1,m=i.useMemo(()=>{const e=[];for(const t of o)e.push(n.jsx("option",{value:t,children:t},t));return e},[o]);return n.jsxs(v,{name:"endpoint_picker",label:p,value:s??"",onChange:e=>d(e.target.value),title:l?a(e=>e.the_only_endpoint):"",disabled:s&&l||c,className:"select validator max-w-32",...u,children:[n.jsx("option",{value:"",disabled:!0,children:a(e=>e.select_endpoint)}),m]})});export{j as E};