-
-
Notifications
You must be signed in to change notification settings - Fork 449
/
Copy pathtooltip.placement.tsx
55 lines (51 loc) · 1.45 KB
/
tooltip.placement.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import { Button, Tooltip } from "flowbite-react";
import type { CodeData } from "~/components/code-demo";
const code = `
import { Button, Tooltip } from "flowbite-react";
export function Component() {
return (
<div className="flex gap-2">
<Tooltip content="Tooltip content" placement="top">
<Button>Tooltip top</Button>
</Tooltip>
<Tooltip content="Tooltip content" placement="right">
<Button>Tooltip right</Button>
</Tooltip>
<Tooltip content="Tooltip content" placement="bottom">
<Button>Tooltip bottom</Button>
</Tooltip>
<Tooltip content="Tooltip content" placement="left">
<Button>Tooltip left</Button>
</Tooltip>
</div>
);
}
`;
export function Component() {
return (
<div className="flex gap-2">
<Tooltip content="Tooltip content" placement="top">
<Button>Tooltip top</Button>
</Tooltip>
<Tooltip content="Tooltip content" placement="right">
<Button>Tooltip right</Button>
</Tooltip>
<Tooltip content="Tooltip content" placement="bottom">
<Button>Tooltip bottom</Button>
</Tooltip>
<Tooltip content="Tooltip content" placement="left">
<Button>Tooltip left</Button>
</Tooltip>
</div>
);
}
export const placement: CodeData = {
type: "single",
code: {
fileName: "index",
language: "tsx",
code,
},
githubSlug: "tooltip/tooltip.placement.tsx",
component: <Component />,
};