@yandex/ui
Version:
Yandex UI components
23 lines (22 loc) • 1.52 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Playground = void 0;
var tslib_1 = require("tslib");
var react_1 = tslib_1.__importStar(require("react"));
var addon_knobs_1 = require("@storybook/addon-knobs");
var bundle_1 = require("@yandex-lego/components/TabsMenu/desktop/bundle");
var Playground = function () {
var _a = tslib_1.__read(react_1.useState('search'), 2), activeTab = _a[0], setActiveTab = _a[1];
var view = addon_knobs_1.select('view', ['default', ''], 'default');
var size = addon_knobs_1.select('size', ['m', 's'], 'm');
var theme = view === '' ? addon_knobs_1.select('theme', ['normal'], 'normal') : null;
var adaptive = addon_knobs_1.boolean('adaptive', true);
var staticMoreText = addon_knobs_1.boolean('staticMoreText', true);
var hideMoreIcon = addon_knobs_1.boolean('hideMoreIcon', false);
return (react_1.default.createElement(bundle_1.TabsMenu, { layout: "horiz", size: size, theme: theme, view: view, tabs: [
{ id: 'search', onClick: function () { return setActiveTab('search'); }, content: 'Поиск' },
{ id: 'images', onClick: function () { return setActiveTab('images'); }, content: 'Картинки' },
{ id: 'video', onClick: function () { return setActiveTab('video'); }, content: 'Видео' },
], onChange: setActiveTab, activeTab: activeTab, adaptive: adaptive, staticMoreText: staticMoreText, hideMoreIcon: hideMoreIcon }));
};
exports.Playground = Playground;