Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/tooltip-nativewind #1867

Merged
merged 8 commits into from
Mar 13, 2024
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