-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
1,015 additions
and
417 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
import { useState } from "react"; | ||
import * as Tooltip from "universal-tooltip"; | ||
import { | ||
StyleSheet, | ||
Text, | ||
View, | ||
Pressable, | ||
Platform, | ||
StatusBar, | ||
} from "react-native"; | ||
import { NavigationContainer } from "@react-navigation/native"; | ||
import { createNativeStackNavigator } from "@react-navigation/native-stack"; | ||
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; | ||
import Ionicons from "@expo/vector-icons/Ionicons"; | ||
import { BottomTabbar } from "./src/navigation/bottom-tab-bar"; | ||
import { | ||
TabBarHomeIcon, | ||
TabBarLikeIcon, | ||
TabBarProfileIcon, | ||
TabBarSearchIcon, | ||
} from "./src/navigation/tab-bar-icon"; | ||
import "./dist/output.css"; | ||
StatusBar.setBarStyle("light-content"); | ||
|
||
const Tab = createBottomTabNavigator(); | ||
const TriggerView = Platform.OS === "web" ? View : Pressable; | ||
|
||
function HomeScreen() { | ||
const [open, setOpen] = useState(false); | ||
return ( | ||
<View className="flex-1 items-center justify-center bg-black"> | ||
{/* <Tooltip.Root | ||
{...Platform.select({ | ||
web: {}, | ||
default: { | ||
open, | ||
onDismiss: () => { | ||
console.log("onDismiss HomeScreen"); | ||
setOpen(false); | ||
}, | ||
}, | ||
})} | ||
> | ||
<Tooltip.Trigger> | ||
<TriggerView | ||
{...Platform.select({ | ||
web: {}, | ||
default: { | ||
open, | ||
onPress: () => { | ||
setOpen(true); | ||
}, | ||
}, | ||
})} | ||
> | ||
<Text>Hello!👋</Text> | ||
</TriggerView> | ||
</Tooltip.Trigger> | ||
<Tooltip.Content | ||
sideOffset={3} | ||
containerStyle={{ | ||
paddingLeft: 16, | ||
paddingRight: 16, | ||
paddingTop: 8, | ||
paddingBottom: 8, | ||
}} | ||
onTap={() => { | ||
console.log("onTap"); | ||
}} | ||
dismissDuration={500} | ||
disableTapToDismiss | ||
side="right" | ||
presetAnimation="fadeIn" | ||
textSize={16} | ||
backgroundColor="black" | ||
fontWeight="bold" | ||
borderRadius={999} | ||
textColor="#fff" | ||
text="Tooltip" | ||
/> | ||
</Tooltip.Root> */} | ||
</View> | ||
); | ||
} | ||
function SearchScreen() { | ||
return ( | ||
<View className="flex-1 items-center justify-center bg-black"> | ||
<Text>Settings!</Text> | ||
</View> | ||
); | ||
} | ||
function LikeScreen() { | ||
return ( | ||
<View className="flex-1 items-center justify-center bg-black"> | ||
<Text>Settings!</Text> | ||
</View> | ||
); | ||
} | ||
function ProfileScreen() { | ||
return ( | ||
<View className="flex-1 items-center justify-center bg-black"> | ||
<Text>Settings!</Text> | ||
</View> | ||
); | ||
} | ||
|
||
export default function App() { | ||
return ( | ||
<div className="flex flex-row w-full justify-end items-center"> | ||
<div className="flex-row"> | ||
<TabBarHomeIcon /> | ||
<TabBarSearchIcon /> | ||
<TabBarLikeIcon /> | ||
<TabBarProfileIcon /> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
const path = require('path'); | ||
const path = require("path"); | ||
module.exports = function (api) { | ||
api.cache(true); | ||
return { | ||
presets: ['babel-preset-expo'], | ||
presets: ["babel-preset-expo"], | ||
plugins: [ | ||
[ | ||
'module-resolver', | ||
"module-resolver", | ||
{ | ||
extensions: ['.tsx', '.ts', '.js', '.json'], | ||
extensions: [".tsx", ".ts", ".js", ".json"], | ||
alias: { | ||
// For development, we want to alias the library to the source | ||
'universal-tooltip': path.join(__dirname, '..', 'src', 'index.ts'), | ||
"universal-tooltip": path.join(__dirname, "..", "src", "index.ts"), | ||
}, | ||
}, | ||
], | ||
"nativewind/babel", | ||
], | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.