UNPKG

@yandex/ui

Version:

Yandex UI components

19 lines (18 loc) 1.18 kB
import { __read } from "tslib"; import React, { useState } from 'react'; import { TabsMenu } from '@yandex-lego/components/TabsMenu/desktop/bundle'; import { TabsPanes } from '@yandex-lego/components/TabsPanes/desktop/bundle'; export var WithTabsMenu = function () { var _a = __read(useState('search'), 2), activeTab = _a[0], setActiveTab = _a[1]; return (React.createElement(React.Fragment, null, React.createElement(TabsMenu, { view: "default", layout: "horiz", size: "m", activeTab: activeTab, 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: 'Видео' }, ] }), React.createElement(TabsPanes, { activePane: activeTab, panes: [ { id: 'search', content: 'Поиск content' }, { id: 'images', content: 'Картинки content' }, { id: 'video', content: 'Видео content' }, ] }))); };