Skip to content

Commit

Permalink
fix: example
Browse files Browse the repository at this point in the history
  • Loading branch information
alantoa committed Jan 9, 2023
1 parent 1d31bfe commit a38129b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions example/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
import { HomeScreen } from "./src/home";

StatusBar.setBarStyle("light-content");
StatusBar.setHidden(true);
const Tab = createBottomTabNavigator();

function SearchScreen() {
Expand Down
13 changes: 7 additions & 6 deletions example/src/navigation/tab-bar-icon.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Platform, Text, View } from "react-native";
import Ionicons from "@expo/vector-icons/Ionicons";
import { useState } from "react";
import { useEffect, useState } from "react";
import * as Tooltip from "universal-tooltip";

type TabBarIconProps = {
Expand Down Expand Up @@ -40,7 +40,11 @@ export function TabBarSearchIcon({ color, focused, onPress }: TabBarIconProps) {

export function TabBarLikeIcon({ color, focused, onPress }: TabBarIconProps) {
const [open, setOpen] = useState(false);

useEffect(() => {
setTimeout(() => {
setOpen(true);
}, 2000);
}, []);
return (
<IconButton>
<Tooltip.Root
Expand All @@ -53,9 +57,6 @@ export function TabBarLikeIcon({ color, focused, onPress }: TabBarIconProps) {
open,
},
})}
onLayout={() => {
setOpen(true);
}}
>
<Tooltip.Trigger>
<Ionicons
Expand All @@ -76,7 +77,7 @@ export function TabBarLikeIcon({ color, focused, onPress }: TabBarIconProps) {
side="top"
presetAnimation="fadeIn"
backgroundColor="#fff"
borderRadius={999}
borderRadius={12}
>
<Tooltip.Text
textSize={12}
Expand Down

0 comments on commit a38129b

Please sign in to comment.