Skip to content

Commit

Permalink
Merge pull request #1867 from gluestack/feat/tooltip
Browse files Browse the repository at this point in the history
feat/tooltip-nativewind
  • Loading branch information
Viraj-10 authored Mar 13, 2024
2 parents f46f242 + c240307 commit c7db467
Show file tree
Hide file tree
Showing 4 changed files with 702 additions and 281 deletions.
54 changes: 0 additions & 54 deletions example/storybook-nativewind/src/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
import React from 'react';
import {
Center,
Text,
Avatar,
AvatarGroup,
AvatarFallbackText,
Box,
Heading,
VStack,
HStack,
Icon,
} from '@gluestack-ui/themed';
import { Tooltip, TooltipContent, TooltipText } from '@/components/ui/tooltip';
import { Button, ButtonText } from '@/components/ui/button';
import { Edit, Command } from 'lucide-react-native';
Expand Down Expand Up @@ -42,60 +30,18 @@ const TooltipBasic = ({
);
};

const FigmaTooltipStory = ({
showTooltip: _showTooltipProp = true,
_placement = 'bottom',
...props
}: any) => {
2;
return (
<Tooltip
{...props}
offset={10}
placement="bottom"
isOpen={true}
_experimentalOverlay={true}
// eslint-disable-next-line react/no-unstable-nested-components
trigger={(triggerProps: any) => {
return (
<Box w={200} h={100} py="$20" alignItems="center">
<Button {...triggerProps}>
<ButtonText>More</ButtonText>
</Button>
</Box>
);
}}
>
<TooltipContent>
<TooltipText>Hello world!</TooltipText>
</TooltipContent>
</Tooltip>
);
};

TooltipBasic.description =
'This is a basic Tooltip component example. A tooltip is a popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.';

export default TooltipBasic;

export {
FigmaTooltipStory,
TooltipBasic,
Tooltip,
TooltipContent,
TooltipText,
Center,
Button,
ButtonText,
Text,
Avatar,
AvatarGroup,
AvatarFallbackText,
Box,
Heading,
Edit,
VStack,
Command,
HStack,
Icon,
};
Loading

0 comments on commit c7db467

Please sign in to comment.