lucid-ui
Version:
A UI component library from AppNexus.
51 lines • 2.69 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.notes = void 0;
var react_1 = __importDefault(require("react"));
var index_1 = require("../../../index");
// eslint-disable-next-line react/prop-types
var OptionCols = function (_a) {
var col1 = _a.col1, col2 = _a.col2;
return (react_1.default.createElement("div", { style: { display: 'flex' } },
react_1.default.createElement("div", { style: { width: 100 } }, col1),
react_1.default.createElement("div", null, col2)));
};
var default_1 = /** @class */ (function (_super) {
__extends(default_1, _super);
function default_1() {
return _super !== null && _super.apply(this, arguments) || this;
}
default_1.prototype.render = function () {
return (react_1.default.createElement(index_1.SingleSelect, null,
react_1.default.createElement(index_1.SingleSelect.OptionGroup, null,
react_1.default.createElement(OptionCols, { col1: 'ID', col2: 'NAME' }),
react_1.default.createElement(index_1.SingleSelect.Option, { Selected: 'Foo (1234)' },
react_1.default.createElement(OptionCols, { col1: '1234', col2: 'Foo' })),
react_1.default.createElement(index_1.SingleSelect.Option, { Selected: 'Bar (2345)' },
react_1.default.createElement(OptionCols, { col1: '2345', col2: 'Bar' })),
react_1.default.createElement(index_1.SingleSelect.Option, { Selected: 'Baz (3456)' },
react_1.default.createElement(OptionCols, { col1: '3456', col2: 'Baz' })))));
};
return default_1;
}(react_1.default.Component));
exports.default = default_1;
// begin-hide-from-docs
exports.notes = "\nThis allows you to have multiple columns of data in your dropdown. Use this when additional data is needed to make a selection.\n";
// end-hide-from-docs
//# sourceMappingURL=03.formatted-options.js.map