|
@@ -40,68 +40,64 @@ export default function Index({
|
|
|
);
|
|
|
};
|
|
|
|
|
|
- if (tabStyle === "outline") {
|
|
|
- return (
|
|
|
- <View>
|
|
|
- <View className="tab-buttons">
|
|
|
- {list.map((item) => {
|
|
|
- return (
|
|
|
- <View
|
|
|
- key={item.key}
|
|
|
- className={`tab-button ${
|
|
|
- tabIndex === item.key ? "tabButton-actived" : ""
|
|
|
- }
|
|
|
- ${full ? "flex flex-1 items-center justify-center" : ""}
|
|
|
- `}
|
|
|
- onClick={() => setTabIndex(item.key)}
|
|
|
- >
|
|
|
- {item.label}
|
|
|
- </View>
|
|
|
- );
|
|
|
- })}
|
|
|
- </View>
|
|
|
- {renderTabContent()}
|
|
|
- </View>
|
|
|
- );
|
|
|
- }
|
|
|
+ // if (tabStyle === "outline") {
|
|
|
+ // return (
|
|
|
+ // <View>
|
|
|
+ // <View className="tab-buttons">
|
|
|
+ // {list.map((item) => {
|
|
|
+ // return (
|
|
|
+ // <View
|
|
|
+ // key={item.key}
|
|
|
+ // className={`tab-button ${
|
|
|
+ // tabIndex === item.key ? "tabButton-actived" : ""
|
|
|
+ // }
|
|
|
+ // ${full ? "flex flex-1 items-center justify-center" : ""}
|
|
|
+ // `}
|
|
|
+ // onClick={() => setTabIndex(item.key)}
|
|
|
+ // >
|
|
|
+ // {item.label}
|
|
|
+ // </View>
|
|
|
+ // );
|
|
|
+ // })}
|
|
|
+ // </View>
|
|
|
+ // {renderTabContent()}
|
|
|
+ // </View>
|
|
|
+ // );
|
|
|
+ // }
|
|
|
|
|
|
- if (tabStyle === "button") {
|
|
|
- return (
|
|
|
- <View>
|
|
|
- <View className={`flex items-center gap-10 py-8 px-10 ${style.buttonTabs}`}>
|
|
|
- {list.map((item) => {
|
|
|
- return (
|
|
|
- <View
|
|
|
- key={item.key}
|
|
|
- className={`${style.buttonTab} ${
|
|
|
- tabIndex === item.key ? style.buttonTabActived : ""
|
|
|
- }
|
|
|
- flex-1 shrink-0
|
|
|
- `}
|
|
|
- onClick={() => setTabIndex(item.key)}
|
|
|
- >
|
|
|
- {item.label}
|
|
|
- </View>
|
|
|
- );
|
|
|
- })}
|
|
|
- </View>
|
|
|
- {renderTabContent()}
|
|
|
- </View>
|
|
|
- );
|
|
|
- }
|
|
|
+ // if (tabStyle === "button") {
|
|
|
+ // return (
|
|
|
+ // <View>
|
|
|
+ // <View className={`flex items-center gap-10 py-8 px-10 ${style.buttonTabs}`}>
|
|
|
+ // {list.map((item) => {
|
|
|
+ // return (
|
|
|
+ // <View
|
|
|
+ // key={item.key}
|
|
|
+ // className={`${style.buttonTab} ${
|
|
|
+ // tabIndex === item.key ? style.buttonTabActived : ""
|
|
|
+ // }
|
|
|
+ // flex-1 shrink-0
|
|
|
+ // `}
|
|
|
+ // onClick={() => setTabIndex(item.key)}
|
|
|
+ // >
|
|
|
+ // {item.label}
|
|
|
+ // </View>
|
|
|
+ // );
|
|
|
+ // })}
|
|
|
+ // </View>
|
|
|
+ // {renderTabContent()}
|
|
|
+ // </View>
|
|
|
+ // );
|
|
|
+ // }
|
|
|
|
|
|
return (
|
|
|
<View>
|
|
|
- <View className="flex items-center gap-12 py-32">
|
|
|
+ <View className="flex items-center gap-8">
|
|
|
{list.map((item) => {
|
|
|
return (
|
|
|
<View
|
|
|
key={item.key}
|
|
|
- className={`rounded-button ${
|
|
|
- tabIndex === item.key ? "actived" : ""
|
|
|
- }
|
|
|
- ${full ? "flex flex-1 items-center justify-center" : ""}
|
|
|
- `}
|
|
|
+ className={tabIndex === item.key ? style.rounedButtonActived : style.rounedButton}
|
|
|
onClick={() => setTabIndex(item.key)}
|
|
|
>
|
|
|
{item.label}
|