UNPKG

opendash

Version:

open.DASH data visualization framework

12 lines 652 B
import * as React from "react"; import { useSource } from ".."; import { Select } from "antd"; export function LinkedSourcePicker(_a) { var style = _a.style; var _b = useSource(), source = _b[0], setSource = _b[1], sources = _b[2]; if (!sources || sources.length === 0) { return null; } return (React.createElement(Select, { style: style, value: source ? source.id : undefined, onChange: setSource, disabled: sources.length < 2 }, sources.map(function (source) { return (React.createElement(Select.Option, { key: source.id, value: source.id }, source.name)); }))); } //# sourceMappingURL=LinkedSourcePicker.js.map