@grafana/ui
Version:
Grafana Components Library
24 lines (19 loc) • 1.17 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var jsxRuntime = require('react/jsx-runtime');
var ReactSelect = require('react-select');
var Icon = require('../../../Icon/Icon.cjs');
;
const SelectOption = (props) => {
const { children, isSelected, data } = props;
return /* @__PURE__ */ jsxRuntime.jsx(ReactSelect.components.Option, { ...props, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "gf-form-select-box__desc-option", children: [
data.imgUrl && /* @__PURE__ */ jsxRuntime.jsx("img", { className: "gf-form-select-box__desc-option__img", src: data.imgUrl, alt: "" }),
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "gf-form-select-box__desc-option__body", children: [
/* @__PURE__ */ jsxRuntime.jsx("div", { children }),
data.description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "gf-form-select-box__desc-option__desc", children: data.description })
] }),
isSelected && /* @__PURE__ */ jsxRuntime.jsx(Icon.Icon, { name: "check", "aria-hidden": "true" })
] }) });
};
exports.SelectOption = SelectOption;
//# sourceMappingURL=SelectOption.cjs.map