Skip to content

Commit

Permalink
Fix on DraggableModal component
Browse files Browse the repository at this point in the history
  • Loading branch information
ntorionbearstudio committed Nov 7, 2024
1 parent 1cd6d82 commit 68774ef
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
1 change: 0 additions & 1 deletion example/app/components/DraggableModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import { SafeAreaView } from 'react-native';
import {
Button,
Icon,
DraggableModal,
Text,
useDisclosure,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-ficus-ui",
"version": "1.3.0",
"version": "1.3.1",
"description": "React Native UI library forked from Magnus UI and inspired by Chakra UI",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
4 changes: 2 additions & 2 deletions src/components/draggable-modal/draggable-modal.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ const DraggableModal: React.FunctionComponent<DraggableModalProps> = (
style={computedStyle.modal}
{...rest}
>
<BottomSheetView>
<Box bg={bg} h={h ?? '100%'} style={computedStyle.container}>
<BottomSheetView style={computedStyle.container}>
<Box h={h ?? '100%'}>
<SafeAreaView style={computedStyle.safeView}>{children}</SafeAreaView>
</Box>
</BottomSheetView>
Expand Down
2 changes: 2 additions & 0 deletions src/components/draggable-modal/draggable-modal.style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
createBorderWidthStyles,
createBorderColorStyles,
createBorderRadiusStyles,
getThemeColor,
} from '../../theme/theme.service';
import { DraggableModalProps } from './draggable-modal.type';

Expand All @@ -27,6 +28,7 @@ export const getStyle = (theme: ThemeType, props: DraggableModalProps) => {
...createSpacingStyles(props, theme.spacing),
...createBorderColorStyles(props, theme.colors),
...createBorderRadiusStyles(props, theme.borderRadius),
backgroundColor: getThemeColor(theme.colors, props.bg as string),
};

computedStyle.safeView = {
Expand Down
12 changes: 6 additions & 6 deletions src/theme/theme.provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ export const ThemeProvider: React.FunctionComponent<ThemeProviderProps> = (
return (
// eslint-disable-next-line react-native/no-inline-styles
<GestureHandlerRootView style={{ flex: 1 }}>
<BottomSheetModalProvider>
<ThemeContext.Provider
value={{ theme: themeState, setTheme, windowWidth: width }}
>
<ThemeContext.Provider
value={{ theme: themeState, setTheme, windowWidth: width }}
>
<BottomSheetModalProvider>
{children}
<Toast {...themeState.toastProps} />
</ThemeContext.Provider>
</BottomSheetModalProvider>
</BottomSheetModalProvider>
</ThemeContext.Provider>
</GestureHandlerRootView>
);
};

0 comments on commit 68774ef

Please sign in to comment.