Skip to content

Commit 048df88

Browse files
committed
fix(showcase): select in modal
1 parent 76eb7d3 commit 048df88

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

apps/showcase/app/modal.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ import {
1717
import { Text } from '~/components/ui/text';
1818
import { H1, Muted } from '~/components/ui/typography';
1919

20-
const CUSTOM_PORTAL_HOST_NAME = 'modal-example';
21-
const WindowOverlay = Platform.OS === 'ios' ? FullWindowOverlay : React.Fragment;
20+
const IOS_PORTAL_HOST_NAME = 'modal-example';
2221

2322
export default function ModalScreen() {
2423
const insets = useSafeAreaInsets();
@@ -50,7 +49,7 @@ export default function ModalScreen() {
5049
<SelectContent
5150
insets={contentInsets}
5251
className='w-full'
53-
portalHost={CUSTOM_PORTAL_HOST_NAME}
52+
portalHost={Platform.select({ ios: IOS_PORTAL_HOST_NAME })}
5453
sideOffset={Platform.select({ ios: 16 })}
5554
>
5655
<SelectGroup>
@@ -84,9 +83,11 @@ export default function ModalScreen() {
8483
</View>
8584
</View>
8685
</View>
87-
<WindowOverlay>
88-
<PortalHost name={CUSTOM_PORTAL_HOST_NAME} />
89-
</WindowOverlay>
86+
{Platform.OS === 'ios' && (
87+
<FullWindowOverlay>
88+
<PortalHost name={IOS_PORTAL_HOST_NAME} />
89+
</FullWindowOverlay>
90+
)}
9091
</>
9192
);
9293
}

0 commit comments

Comments
 (0)