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/popover #2262

Merged
merged 10 commits into from
Jul 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions example/storybook-nativewind/babel.config.js
Original file line number Diff line number Diff line change
@@ -78,6 +78,10 @@ module.exports = function (api) {
__dirname,
'../../packages/unstyled/popover/src'
),
'@react-native-aria/overlays': path.resolve(
__dirname,
'../../packages/react-native-aria/overlays/src'
),
'@gluestack-style/react': path.resolve(
__dirname,
'../../packages/styled/react/src'
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ const PopoverMeta: ComponentMeta<typeof Popover> = {
'top right',
'left',
'left bottom',
'left right',
'left top',
'right',
'right bottom',
'right top',
40 changes: 4 additions & 36 deletions example/storybook-nativewind/src/components/Popover/Popover.tsx
Original file line number Diff line number Diff line change
@@ -11,10 +11,7 @@ import {
} from '@/components/ui/popover';
import { Button, ButtonText } from '@/components/ui/button';
import { Text } from '@/components/ui/text';
import { Heading } from '@/components/ui/heading';
import { Box } from '@/components/ui/box';
import { X } from 'lucide-react-native';
import { Icon } from '@/components/ui/icon';

const PopoverBasic = (props: any) => {
const [showPopover, setShowPopover] = React.useState(false);
@@ -39,43 +36,14 @@ const PopoverBasic = (props: any) => {
}}
>
<PopoverBackdrop />
<PopoverContent className="max-w-[400]">
<PopoverContent>
<PopoverArrow />
<PopoverHeader>
<Heading>Welcome!</Heading>
<PopoverCloseButton>
<Icon as={X} size="lg" />
</PopoverCloseButton>
</PopoverHeader>
<PopoverBody>
<Text>
Join the product tour and start creating your own checklist. Are you
ready to jump in?
<Text size={props.size} className="text-typography-900">
Alex, Annie and many others are already enjoying the Pro features,
don't miss out on the fun!
</Text>
</PopoverBody>
<PopoverFooter>
<Text size="xs" className="flex-1">
Step 2 of 3
</Text>
{/* @ts-ignore */}
<Button
variant="outline"
action="secondary"
className="mr-3"
onPress={() => {
setShowPopover(false);
}}
>
<ButtonText>Back</ButtonText>
</Button>
<Button
onPress={() => {
setShowPopover(false);
}}
>
<ButtonText>Next</ButtonText>
</Button>
</PopoverFooter>
</PopoverContent>
</Popover>
);
Loading