diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-09-05 10:42:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-05 10:42:19 -0700 |
commit | 764c7cd5694a41c98d8543b68d7791fa90db4291 (patch) | |
tree | 8a11af0aa0e898cf7fb57ab0354f9fb5d28f004e /src/view/com/modals/report/Modal.tsx | |
parent | be8084ae103064d5680485f25e202c763957f2b4 (diff) | |
download | voidsky-764c7cd5694a41c98d8543b68d7791fa90db4291.tar.zst |
Updates to use dynamic/responsive styles on web (#1351)
* Move most responsive queries to the hook * Fix invalid CSS value * Fixes to tablet render of post thread * Fix overflow issues on web * Fix search header on tablet * Fix QP margin in web composer * Fix: only apply double gutter once to flatlist (close #1368) * Fix styles on discover feeds header * Fix double discover links in multifeed
Diffstat (limited to 'src/view/com/modals/report/Modal.tsx')
-rw-r--r-- | src/view/com/modals/report/Modal.tsx | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/view/com/modals/report/Modal.tsx b/src/view/com/modals/report/Modal.tsx index f386b110d..8aabe0871 100644 --- a/src/view/com/modals/report/Modal.tsx +++ b/src/view/com/modals/report/Modal.tsx @@ -3,6 +3,7 @@ import {Linking, StyleSheet, TouchableOpacity, View} from 'react-native' import {ScrollView} from 'react-native-gesture-handler' import {AtUri} from '@atproto/api' import {useStores} from 'state/index' +import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' import {s} from 'lib/styles' import {Text} from '../../util/text/Text' import * as Toast from '../../util/Toast' @@ -37,6 +38,7 @@ type ReportComponentProps = export function Component(content: ReportComponentProps) { const store = useStores() const pal = usePalette('default') + const {isMobile} = useWebMediaQueries() const [isProcessing, setIsProcessing] = useState(false) const [showDetailsInput, setShowDetailsInput] = useState(false) const [error, setError] = useState<string>() @@ -87,7 +89,13 @@ export function Component(content: ReportComponentProps) { return ( <ScrollView testID="reportModal" style={[s.flex1, pal.view]}> - <View style={styles.container}> + <View + style={[ + styles.container, + isMobile && { + paddingBottom: 40, + }, + ]}> {showDetailsInput ? ( <InputIssueDetails details={details} @@ -153,16 +161,14 @@ const SelectIssue = ({ <Text style={[pal.textLight, styles.description]}> What is the issue with this {collectionName}? </Text> - <ReportReasonOptions - atUri={atUri} - selectedIssue={issue} - onSelectIssue={onSelectIssue} - /> - {error ? ( - <View style={s.mt10}> - <ErrorMessage message={error} /> - </View> - ) : undefined} + <View style={{marginBottom: 10}}> + <ReportReasonOptions + atUri={atUri} + selectedIssue={issue} + onSelectIssue={onSelectIssue} + /> + </View> + {error ? <ErrorMessage message={error} /> : undefined} {/* If no atUri is present, the report would be for account in which case, we allow sending without specifying a reason */} {issue || !atUri ? ( <> @@ -188,7 +194,6 @@ const SelectIssue = ({ const styles = StyleSheet.create({ container: { paddingHorizontal: 10, - paddingBottom: 40, }, title: { textAlign: 'center', |