-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(example-app): ✨ add popups module, create tooltip component scr…
…een with examples
- Loading branch information
1 parent
6e99612
commit 651ef1b
Showing
4 changed files
with
92 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from "./popups"; | ||
export * from "./primitives"; |
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,81 @@ | ||
import React from "react"; | ||
import { | ||
Box, | ||
Button, | ||
Clock, | ||
Icon, | ||
Tooltip, | ||
useTheme, | ||
} from "@adaptui/react-native-tailwind"; | ||
|
||
export const TooltipScreen = () => { | ||
const tailwind = useTheme(); | ||
return ( | ||
<Box | ||
style={tailwind.style("flex-1 justify-center items-center bg-white-900")} | ||
> | ||
<Tooltip | ||
hasArrow | ||
placement="top" | ||
trigger={ | ||
<Button | ||
style={tailwind.style("my-1")} | ||
prefix={<Icon icon={<Clock />} />} | ||
themeColor="success" | ||
size="sm" | ||
> | ||
Progress on Top | ||
</Button> | ||
} | ||
content="2 out 3 tasks completed" | ||
/> | ||
<Tooltip | ||
hasArrow | ||
placement="bottom" | ||
trigger={ | ||
<Button | ||
style={tailwind.style("my-1")} | ||
prefix={<Icon icon={<Clock />} />} | ||
themeColor="success" | ||
variant="outline" | ||
size="sm" | ||
> | ||
Progress on Bottom | ||
</Button> | ||
} | ||
content="2 out 3 tasks completed" | ||
/> | ||
<Tooltip | ||
hasArrow | ||
placement="left" | ||
trigger={ | ||
<Button | ||
style={tailwind.style("my-1")} | ||
prefix={<Icon icon={<Clock />} />} | ||
themeColor="success" | ||
variant="subtle" | ||
size="sm" | ||
> | ||
Progress on Left | ||
</Button> | ||
} | ||
content="2 out 3 tasks completed" | ||
/> | ||
<Tooltip | ||
hasArrow | ||
placement="right" | ||
trigger={ | ||
<Button | ||
style={tailwind.style("my-1")} | ||
themeColor="success" | ||
variant="ghost" | ||
size="sm" | ||
> | ||
Progress on Right | ||
</Button> | ||
} | ||
content="2 out 3 tasks completed" | ||
/> | ||
</Box> | ||
); | ||
}; |
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 @@ | ||
export * from "./TooltipScreen"; |