tuns-mobile-components
Version:
Tuns Design UI
38 lines (33 loc) • 772 B
JavaScript
import React from "react";
import UITab from "../../../components/mobile/src/tabs";
const TabsDemo = () => {
const renderContent = tab => {
return (
<div
style={{
display: "flex",
alignItems: "center",
justifyContent: "center",
height: "300px",
backgroundColor: "#fff",
}}
>
<p>{`Content of ${tab.title}`}</p>
</div>
);
};
const tabs = [
{ title: "产品特色" },
{ title: "三个字" },
{ title: "投保须知" },
{ title: "产品条款" },
// { title: "理赔服务" },
];
return (
<div>
<h2>UITab demo</h2>
<UITab tabs={tabs}>{tabs.map(item => renderContent(item))}</UITab>
</div>
);
};
export default TabsDemo;