move modal styles to utils

This commit is contained in:
ppc
2024-08-13 18:23:56 +01:00
parent 9cd875490d
commit 357be2ead3
2 changed files with 52 additions and 42 deletions
+35
View File
@@ -0,0 +1,35 @@
import {StyleSheet} from "react-native";
import {useTheme} from "react-native-paper";
import {useMemo} from "react";
const modalStyles = StyleSheet.create({
formItemName: {
minWidth: 100,
fontWeight: "400"
},
formItemRow: {
flexDirection: "row",
alignItems: "center"
},
formItemDivider: {
marginVertical: 15
}
});
export function useModalStyles() {
const theme = useTheme();
return useMemo(() => StyleSheet.create({
...modalStyles,
formItemInput: {
flex: 1,
color: theme.colors.onSurface
},
formFootnote: {
fontSize: 13,
color: theme.colors.outline
},
headerText: {
color: theme.colors.primary
}
}), [theme]);
}