shineout
Version:
A components library for React
53 lines (52 loc) • 1.39 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _ = require("./..");
var _jsxRuntime = require("react/jsx-runtime");
/**
* cn - 替换Tabs.Link
* -- 替换Tabs.Link
* en - Tabs.Link
* -- Usage of Tabs.Link
*/
var _default = exports.default = function _default() {
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__*/(0, _jsxRuntime.jsx)("div", {
style: {
height: 100
},
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Tabs, {
shape: "line",
defaultActive: 0,
children: tabs.map(function (tab, index) {
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Tabs.Panel, {
tab: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
href: "http://www.baidu.com/",
target: "_blank",
onClick: function onClick() {
console.log('a element clicked');
},
rel: "noreferrer",
children: tab.title
}),
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
style: {
padding: 16,
height: '100%',
fontSize: 14
},
children: tab.content
})
}, index);
})
})
});
};