@@ -72,7 +72,7 @@ export function GitCommitSheet(_props: GitCommitSheetProps) {
7272 return (
7373 < View
7474 collapsable = { false }
75- className = { Platform . OS === "android" ? " bg-sheet" : " flex-1 bg-sheet" }
75+ className = " bg-sheet ios: flex-1"
7676 style = { Platform . OS === "android" ? { maxHeight : windowHeight * 0.92 } : undefined }
7777 >
7878 { Platform . OS === "android" ? (
@@ -92,35 +92,21 @@ export function GitCommitSheet(_props: GitCommitSheetProps) {
9292 ) : null }
9393 < MaterialScreenContent fitToContents >
9494 < ScrollView
95- className = { Platform . OS === "android" ? " shrink grow-0" : " flex-1"}
95+ className = "android: shrink android: grow-0 ios: flex-1"
9696 keyboardShouldPersistTaps = "handled"
9797 showsVerticalScrollIndicator = { false }
9898 contentInset = { { bottom : Math . max ( insets . bottom , 18 ) + 18 } }
99- contentContainerClassName = { Platform . OS === "android" ? " gap-2 p-2" : " gap-4 px-5 pt-2"}
99+ contentContainerClassName = "android: gap-2 android: p-2 ios: gap-4 ios: px-5 ios: pt-2"
100100 contentContainerStyle = {
101101 Platform . OS === "android"
102102 ? { paddingBottom : Math . max ( insets . bottom , 18 ) + 18 }
103103 : undefined
104104 }
105105 >
106- < View
107- className = { cn (
108- "gap-3 bg-card p-4" ,
109- Platform . OS === "android" ? "rounded-[20px]" : "rounded-[22px] border border-border" ,
110- ) }
111- >
112- < View
113- className = {
114- Platform . OS === "android" ? "gap-1" : "flex-row items-center justify-between gap-3"
115- }
116- >
106+ < View className = "gap-3 bg-card p-4 android:rounded-[20px] ios:rounded-[22px] ios:border ios:border-border" >
107+ < View className = "android:gap-1 ios:flex-row ios:items-center ios:justify-between ios:gap-3" >
117108 < Text className = "text-foreground-muted text-sm font-medium" > Branch</ Text >
118- < Text
119- className = { cn (
120- "text-foreground text-base" ,
121- Platform . OS === "android" ? "font-t3-medium" : "font-t3-bold" ,
122- ) }
123- >
109+ < Text className = "text-foreground text-base android:font-t3-medium ios:font-t3-bold" >
124110 { gitStatus . data ?. refName ?? "(detached HEAD)" }
125111 </ Text >
126112 </ View >
@@ -131,20 +117,10 @@ export function GitCommitSheet(_props: GitCommitSheetProps) {
131117 ) : null }
132118 </ View >
133119
134- < View
135- className = { cn (
136- "gap-3 bg-card p-4" ,
137- Platform . OS === "android" ? "rounded-[20px]" : "rounded-[22px] border border-border" ,
138- ) }
139- >
120+ < View className = "gap-3 bg-card p-4 android:rounded-[20px] ios:rounded-[22px] ios:border ios:border-border" >
140121 < View className = "flex-row items-center justify-between gap-3" >
141122 < View className = "gap-1" >
142- < Text
143- className = { cn (
144- "text-foreground text-base" ,
145- Platform . OS === "android" ? "font-t3-medium" : "font-t3-bold" ,
146- ) }
147- >
123+ < Text className = "text-foreground text-base android:font-t3-medium ios:font-t3-bold" >
148124 Files
149125 </ Text >
150126 < Text className = "text-foreground-muted text-xs leading-normal" >
@@ -154,39 +130,19 @@ export function GitCommitSheet(_props: GitCommitSheetProps) {
154130 < View className = "flex-row items-center gap-2" >
155131 { ! allSelected && isEditingFiles ? (
156132 < Pressable
157- className = {
158- Platform . OS === "android"
159- ? "min-h-12 justify-center rounded-full px-3 active:bg-subtle"
160- : "bg-subtle rounded-full px-3 py-2"
161- }
133+ className = "rounded-full px-3 android:min-h-12 android:justify-center android:active:bg-subtle ios:bg-subtle ios:py-2"
162134 onPress = { ( ) => setExcludedFiles ( new Set ( ) ) }
163135 >
164- < Text
165- className = {
166- Platform . OS === "android"
167- ? "text-primary-text text-sm font-t3-medium"
168- : "text-foreground text-2xs font-t3-bold uppercase"
169- }
170- >
136+ < Text className = "android:text-primary-text android:text-sm android:font-t3-medium ios:text-foreground ios:text-2xs ios:font-t3-bold ios:uppercase" >
171137 Reset
172138 </ Text >
173139 </ Pressable >
174140 ) : null }
175141 < Pressable
176- className = {
177- Platform . OS === "android"
178- ? "min-h-12 justify-center rounded-full px-3 active:bg-subtle"
179- : "bg-subtle rounded-full px-3 py-2"
180- }
142+ className = "rounded-full px-3 android:min-h-12 android:justify-center android:active:bg-subtle ios:bg-subtle ios:py-2"
181143 onPress = { ( ) => setIsEditingFiles ( ( current ) => ! current ) }
182144 >
183- < Text
184- className = {
185- Platform . OS === "android"
186- ? "text-primary-text text-sm font-t3-medium"
187- : "text-foreground text-2xs font-t3-bold uppercase"
188- }
189- >
145+ < Text className = "android:text-primary-text android:text-sm android:font-t3-medium ios:text-foreground ios:text-2xs ios:font-t3-bold ios:uppercase" >
190146 { isEditingFiles ? "Done" : "Edit" }
191147 </ Text >
192148 </ Pressable >
@@ -226,15 +182,10 @@ export function GitCommitSheet(_props: GitCommitSheetProps) {
226182 < Pressable
227183 key = { file . path }
228184 className = { cn (
229- "px-4 py-3" ,
230- Platform . OS === "android"
231- ? included
232- ? "rounded-xl bg-subtle"
233- : "rounded-xl"
234- : cn (
235- "rounded-[18px] border" ,
236- included ? "border-border" : "border-border-subtle" ,
237- ) ,
185+ "px-4 py-3 android:rounded-xl ios:rounded-[18px] ios:border" ,
186+ included
187+ ? "android:bg-subtle ios:border-border"
188+ : "ios:border-border-subtle" ,
238189 ) }
239190 accessibilityRole = "checkbox"
240191 accessibilityLabel = { file . path }
@@ -303,16 +254,8 @@ export function GitCommitSheet(_props: GitCommitSheetProps) {
303254 ) }
304255 </ View >
305256
306- < View
307- className = { Platform . OS === "android" ? "gap-3 rounded-[20px] bg-card p-4" : "gap-2" }
308- >
309- < Text
310- className = {
311- Platform . OS === "android"
312- ? "text-foreground text-base font-t3-medium"
313- : "text-foreground text-sm font-t3-bold"
314- }
315- >
257+ < View className = "android:gap-3 android:rounded-[20px] android:bg-card android:p-4 ios:gap-2" >
258+ < Text className = "text-foreground android:text-base android:font-t3-medium ios:text-sm ios:font-t3-bold" >
316259 Commit message
317260 </ Text >
318261 < TextInput
@@ -322,23 +265,20 @@ export function GitCommitSheet(_props: GitCommitSheetProps) {
322265 onChangeText = { setDialogCommitMessage }
323266 placeholder = "Leave empty to auto-generate"
324267 textAlignVertical = "top"
325- className = { cn (
326- "min-h-[128px] px-4 py-3.5" ,
327- Platform . OS === "android" ? "rounded-xl bg-sheet-solid" : "rounded-[20px]" ,
328- ) }
268+ className = "min-h-[128px] px-4 py-3.5 android:rounded-xl android:bg-sheet-solid ios:rounded-[20px]"
329269 />
330270 </ View >
331271
332- < View className = { Platform . OS === "android" ? " gap-2" : " flex-row gap-3"} >
333- < View className = { Platform . OS === "android" ? undefined : " flex-1"} >
272+ < View className = "android: gap-2 ios: flex-row ios: gap-3" >
273+ < View className = "ios: flex-1">
334274 < SheetActionButton
335275 icon = "arrow.branch"
336276 label = "Commit on new branch"
337277 disabled = { noneSelected || busy }
338278 onPress = { ( ) => void runCommitAction ( true ) }
339279 />
340280 </ View >
341- < View className = { Platform . OS === "android" ? undefined : " flex-1"} >
281+ < View className = "ios: flex-1">
342282 < SheetActionButton
343283 icon = "checkmark.circle"
344284 label = "Commit"
0 commit comments