Skip to content

Commit

Permalink
Success with TouchableOpacityProps
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewTurk247 committed Sep 20, 2023
1 parent e41b602 commit c54fc08
Showing 1 changed file with 7 additions and 20 deletions.
27 changes: 7 additions & 20 deletions components/screens/Section.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Layout, List, Tab, TabBar, Text } from "@ui-kitten/components";
import { Layout, List, Tab, TabBar, Text, useTheme } from "@ui-kitten/components";
import { DeviceType } from "expo-device";
import React, { useContext, useEffect, useState } from "react";
import { ActivityIndicator, ScrollView, StyleSheet, View } from "react-native";
Expand Down Expand Up @@ -63,6 +63,7 @@ export default function Section({ route, navigation }) {

const Container = theme === "dark" ? Layout : View;
const pagerViewRef = React.useRef(null);
const accentColor = useTheme()["color-primary-600"];

return (
<>
Expand All @@ -76,31 +77,17 @@ export default function Section({ route, navigation }) {
indicatorStyle={{ opacity: 0 }}
>
<ScrollView horizontal showsHorizontalScrollIndicator={false}>
{/* TouchableOpacityProps */}
<Tab
title={() => (
<Text
category="label"
selectionColor="info"
appearance={selection === 1 ? undefined : "hint"}
// style={{ marginHorizontal: Spacing.medium, color: selection === 0 ? "red" : undefined }}
>
style={{ marginHorizontal: Spacing.medium }}
title={({ style, ...rest }) => (
<Text {...rest} style={{ ...style, color: accentColor }}>
{category.name}
</Text>
)}
/>
{Object.values(category.desks).map((section, index) => (
<Tab
title={() => (
<Text
category="label"
selectionColor="info"
// status="basic"
style={{ marginHorizontal: Spacing.medium }}
>
{section.name}
</Text>
)}
/>
<Tab style={{ marginHorizontal: Spacing.medium }} title={section.name} />
))}
</ScrollView>
</TabBar>
Expand Down

0 comments on commit c54fc08

Please sign in to comment.