Skip to content

Commit cdc3a78

Browse files
Merge pull request #149 from OpenDTU-App/max-width-modal
2 parents e500d6e + 92a3867 commit cdc3a78

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

licenses.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"licenseUrl": "https://github.com/expo/expo",
7878
"parents": "opendtu-react-native"
7979
},
80-
80+
8181
"licenses": "MIT",
8282
"repository": "https://github.com/i18next/i18next",
8383
"licenseUrl": "https://github.com/i18next/i18next/raw/master/LICENSE",

src/components/BaseModal.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ const BaseModal: FC<BaseModalProps> = ({
2929
? { height: '100%', paddingBottom: spacing * 10 }
3030
: {}),
3131
backgroundColor: visible ? 'rgba(0, 0, 0, 0.5)' : undefined,
32+
alignItems: 'center',
33+
justifyContent: 'center',
34+
flexDirection: 'row',
3235
}}
3336
contentContainerStyle={{
3437
backgroundColor: backgroundColor ?? theme.colors.elevation.level4,
@@ -38,6 +41,8 @@ const BaseModal: FC<BaseModalProps> = ({
3841
borderRadius: 28,
3942
marginVertical: 8,
4043
marginHorizontal: 24,
44+
maxWidth: 450,
45+
flex: 1,
4146
}}
4247
>
4348
{children}

src/views/navigation/tabs/InverterListTab.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ import { useTheme } from 'react-native-paper';
55
import DeviceOfflineWrapper from '@/components/DeviceOfflineWrapper';
66
import InverterList from '@/components/inverters/InverterList';
77

8-
import { StyledScrollView } from '@/style';
8+
import { StyledView } from '@/style';
99

1010
const InverterListTab: FC = () => {
1111
const theme = useTheme();
1212

1313
return (
14-
<StyledScrollView theme={theme}>
14+
<StyledView theme={theme}>
1515
<DeviceOfflineWrapper>
1616
<Box style={{ flex: 1, justifyContent: 'flex-start', width: '100%' }}>
1717
<InverterList />
1818
</Box>
1919
</DeviceOfflineWrapper>
20-
</StyledScrollView>
20+
</StyledView>
2121
);
2222
};
2323

0 commit comments

Comments
 (0)