Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
alantoa authored Aug 31, 2023
1 parent d4b17f2 commit df3d274
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ This is a pure and simple native tooltip component that supports fadeIn and zoom
import { useState } from "react";
import * as Tooltip from "universal-tooltip";
import { Text, View, Pressable, Platform } from "react-native";

// because each platform has different behaviors, but you can replace the components yourself, of course.
const TriggerView = Platform.OS === "web" ? View : Pressable;

// This is because each platform has different behaviors, but you can replace the components yourself, of course.
const [open, setOpen] = useState(false);

<Tooltip.Root
// On web, I would like to be triggered automatically with the mouse.
// For web, I would like to be triggered automatically with the mouse.
{...Platform.select({
web: {},
default: {
Expand Down

0 comments on commit df3d274

Please sign in to comment.