@yandex/ui
Version:
Yandex UI components
19 lines (18 loc) • 1.17 kB
JavaScript
import { __read } from "tslib";
import React, { useState } from 'react';
import { Radiobox } from '@yandex-lego/components/Radiobox/desktop/bundle';
import { TabsPanes } from '@yandex-lego/components/TabsPanes/desktop/bundle';
export var WithRadiobox = function () {
var _a = __read(useState('search'), 2), activeTab = _a[0], setActiveTab = _a[1];
return (React.createElement(React.Fragment, null,
React.createElement(Radiobox, { size: "m", view: "default", value: activeTab, options: [
{ label: 'Поиск', value: 'search', onClick: function () { return setActiveTab('search'); } },
{ label: 'Картинки', value: 'images', onClick: function () { return setActiveTab('images'); } },
{ label: 'Видео', value: 'video', onClick: function () { return setActiveTab('video'); } },
] }),
React.createElement(TabsPanes, { activePane: activeTab, panes: [
{ id: 'search', content: 'Поиск content' },
{ id: 'images', content: 'Картинки content' },
{ id: 'video', content: 'Видео content' },
] })));
};