UNPKG

shineout

Version:
47 lines 1.18 kB
/** * cn - 替换Tabs.Link * -- 替换Tabs.Link * en - Tabs.Link * -- Usage of Tabs.Link */ import { Tabs } from "./.."; import { jsx as _jsx } from "react/jsx-runtime"; export default (function () { var tabs = []; for (var i = 0; i < 3; i++) { tabs.push({ title: "Tab ".concat(i + 1), content: "Content of Tab ".concat(i + 1) }); } return /*#__PURE__*/_jsx("div", { style: { height: 100 }, children: /*#__PURE__*/_jsx(Tabs, { shape: "line", defaultActive: 0, children: tabs.map(function (tab, index) { return /*#__PURE__*/_jsx(Tabs.Panel, { tab: /*#__PURE__*/_jsx("a", { href: "http://www.baidu.com/", target: "_blank", onClick: function onClick() { console.log('a element clicked'); }, rel: "noreferrer", children: tab.title }), children: /*#__PURE__*/_jsx("div", { style: { padding: 16, height: '100%', fontSize: 14 }, children: tab.content }) }, index); }) }) }); });