UNPKG

@yandex/ui

Version:

Yandex UI components

10 lines (9 loc) 632 B
import { __read, __spread } from "tslib"; import React, { useState } from 'react'; import { TabsMenu } from '@yandex-lego/components/TabsMenu/desktop/bundle'; export var Adaptive = function () { var _a = __read(useState('0'), 2), activeTab = _a[0], setActiveTab = _a[1]; var tabs = __spread(Array(20).keys()).map(function (idx) { return ({ id: idx.toString(), content: "Tab-" + idx }); }); return (React.createElement("div", { style: { height: 200 } }, React.createElement(TabsMenu, { adaptive: true, size: "m", view: "default", layout: "horiz", tabs: tabs, activeTab: activeTab, onChange: setActiveTab }))); };