Skip to content

Commit 61061fd

Browse files
committed
refactor: update styles in App and NetworkLogItem components for better readability
1 parent 742cf59 commit 61061fd

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

example/src/App.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ const App: React.FC = () => {
230230
};
231231

232232
return (
233-
<GestureHandlerRootView style={{ flex: 1 }}>
233+
<GestureHandlerRootView style={styles.root}>
234234
<SafeAreaView style={styles.container}>
235235
<ScrollView contentContainerStyle={styles.scrollContent}>
236236
<View style={styles.header}>
@@ -314,6 +314,7 @@ const App: React.FC = () => {
314314
};
315315

316316
const styles = StyleSheet.create({
317+
root: { flex: 1 },
317318
container: {
318319
flex: 1,
319320
backgroundColor: '#f5f5f5',

src/NetworkLogItem.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ const NetworkLogItem: React.FC<NetworkLogItemProps> = ({
165165
</Text>
166166
<CopyItem
167167
useCopyToClipboard={useCopyToClipboard}
168-
style={[styles.copyToClipboard, { top: '30%' }]}
168+
style={[styles.copyToClipboard, styles.copyItemPosition]}
169169
textToCopy={formatBody(log.response.body)}
170170
/>
171171
</View>
@@ -175,7 +175,7 @@ const NetworkLogItem: React.FC<NetworkLogItemProps> = ({
175175
{log.error && (
176176
<>
177177
<Text style={styles.sectionTitle}>Error:</Text>
178-
<Text style={[styles.codeText, { color: '#F44336' }]}>
178+
<Text style={[styles.codeText, styles.errorColor]}>
179179
{log.error}
180180
</Text>
181181
</>
@@ -188,6 +188,8 @@ const NetworkLogItem: React.FC<NetworkLogItemProps> = ({
188188
};
189189

190190
const styles = StyleSheet.create({
191+
errorColor: { color: '#F44336' },
192+
copyItemPosition: { top: '30%' },
191193
logItem: {
192194
backgroundColor: '#fff',
193195
marginBottom: 8,

0 commit comments

Comments
 (0)