UNPKG

@yandex/ui

Version:

Yandex UI components

21 lines (20 loc) 1.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LongHermioneCase = void 0; var tslib_1 = require("tslib"); var react_1 = tslib_1.__importStar(require("react")); var bundle_1 = require("@yandex-lego/components/Select/desktop/bundle"); var options = []; for (var idx = 0; idx < 40; idx++) { options.push({ value: idx, content: idx }); } var styles = "\n body {\n font-family: Helvetica, Arial, sans-serif;\n margin: 0;\n padding: 0;\n }\n\n .container {\n display: inline-flex;\n background-color: #fcc;\n height: 100vh;\n width: 300px;\n }\n"; var LongHermioneCase = function (props) { var maxHeight = props.maxHeight; var _a = tslib_1.__read(react_1.useState(0), 2), value = _a[0], setValue = _a[1]; return (react_1.default.createElement(react_1.default.Fragment, null, react_1.default.createElement("style", null, styles), react_1.default.createElement("div", { "data-testid": "container", className: "container" }, react_1.default.createElement(bundle_1.Select, { view: "default", size: "m", value: value, onChange: function (event) { return setValue(event.target.value); }, options: options, maxHeight: maxHeight })))); }; exports.LongHermioneCase = LongHermioneCase;