File tree Expand file tree Collapse file tree 4 files changed +92
-2
lines changed
Expand file tree Collapse file tree 4 files changed +92
-2
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,14 @@ import {
99 CheckboxScreen ,
1010 MeterComponentScreen ,
1111 SpinnerScreen ,
12- } from "./modules/primitives" ;
12+ TooltipScreen ,
13+ } from "./modules" ;
1314
1415const Drawer = createDrawerNavigator ( ) ;
1516
1617const AppRoot = ( ) => {
1718 return (
18- < Drawer . Navigator initialRouteName = "AvatarScreen " >
19+ < Drawer . Navigator initialRouteName = "TooltipScreen " >
1920 < Drawer . Screen
2021 options = { { title : "Avatar" } }
2122 name = "AvatarScreen"
@@ -51,6 +52,11 @@ const AppRoot = () => {
5152 name = "MeterComponentScreen"
5253 component = { MeterComponentScreen }
5354 />
55+ < Drawer . Screen
56+ options = { { title : "Tooltip" } }
57+ name = "TooltipScreen"
58+ component = { TooltipScreen }
59+ />
5460 </ Drawer . Navigator >
5561 ) ;
5662} ;
Original file line number Diff line number Diff line change 1+ export * from "./popups" ;
2+ export * from "./primitives" ;
Original file line number Diff line number Diff line change 1+ import React from "react" ;
2+ import {
3+ Box ,
4+ Button ,
5+ Clock ,
6+ Icon ,
7+ Tooltip ,
8+ useTheme ,
9+ } from "@adaptui/react-native-tailwind" ;
10+
11+ export const TooltipScreen = ( ) => {
12+ const tailwind = useTheme ( ) ;
13+ return (
14+ < Box
15+ style = { tailwind . style ( "flex-1 justify-center items-center bg-white-900" ) }
16+ >
17+ < Tooltip
18+ hasArrow
19+ placement = "top"
20+ trigger = {
21+ < Button
22+ style = { tailwind . style ( "my-1" ) }
23+ prefix = { < Icon icon = { < Clock /> } /> }
24+ themeColor = "success"
25+ size = "sm"
26+ >
27+ Progress on Top
28+ </ Button >
29+ }
30+ content = "2 out 3 tasks completed"
31+ />
32+ < Tooltip
33+ hasArrow
34+ placement = "bottom"
35+ trigger = {
36+ < Button
37+ style = { tailwind . style ( "my-1" ) }
38+ prefix = { < Icon icon = { < Clock /> } /> }
39+ themeColor = "success"
40+ variant = "outline"
41+ size = "sm"
42+ >
43+ Progress on Bottom
44+ </ Button >
45+ }
46+ content = "2 out 3 tasks completed"
47+ />
48+ < Tooltip
49+ hasArrow
50+ placement = "left"
51+ trigger = {
52+ < Button
53+ style = { tailwind . style ( "my-1" ) }
54+ prefix = { < Icon icon = { < Clock /> } /> }
55+ themeColor = "success"
56+ variant = "subtle"
57+ size = "sm"
58+ >
59+ Progress on Left
60+ </ Button >
61+ }
62+ content = "2 out 3 tasks completed"
63+ />
64+ < Tooltip
65+ hasArrow
66+ placement = "right"
67+ trigger = {
68+ < Button
69+ style = { tailwind . style ( "my-1" ) }
70+ themeColor = "success"
71+ variant = "ghost"
72+ size = "sm"
73+ >
74+ Progress on Right
75+ </ Button >
76+ }
77+ content = "2 out 3 tasks completed"
78+ />
79+ </ Box >
80+ ) ;
81+ } ;
Original file line number Diff line number Diff line change 1+ export * from "./TooltipScreen" ;
You can’t perform that action at this time.
0 commit comments