1- import { PropsWithChildren , useState } from 'react' ;
2- import { StyleSheet , TouchableOpacity } from 'react-native' ;
1+ import { PropsWithChildren , useState } from 'react'
2+ import { StyleSheet , TouchableOpacity } from 'react-native'
33
4- import { ThemedText } from '@/components/ThemedText' ;
5- import { ThemedView } from '@/components/ThemedView' ;
6- import { IconSymbol } from '@/components/ui/IconSymbol' ;
7- import { Colors } from '@/constants/Colors' ;
8- import { useColorScheme } from '@/hooks/useColorScheme' ;
4+ import { ThemedText } from '@/components/ThemedText'
5+ import { ThemedView } from '@/components/ThemedView'
6+ import { IconSymbol } from '@/components/ui/IconSymbol'
7+ import { Colors } from '@/constants/Colors'
8+ import { useColorScheme } from '@/hooks/useColorScheme'
99
1010export function Collapsible ( { children, title } : PropsWithChildren & { title : string } ) {
11- const [ isOpen , setIsOpen ] = useState ( false ) ;
12- const theme = useColorScheme ( ) ?? 'light' ;
11+ const [ isOpen , setIsOpen ] = useState ( false )
12+ const theme = useColorScheme ( ) ?? 'light'
1313
1414 return (
1515 < ThemedView >
1616 < TouchableOpacity
1717 style = { styles . heading }
1818 onPress = { ( ) => setIsOpen ( ( value ) => ! value ) }
19- activeOpacity = { 0.8 } >
19+ activeOpacity = { 0.8 }
20+ >
2021 < IconSymbol
2122 name = "chevron.right"
2223 size = { 18 }
@@ -29,7 +30,7 @@ export function Collapsible({ children, title }: PropsWithChildren & { title: st
2930 </ TouchableOpacity >
3031 { isOpen && < ThemedView style = { styles . content } > { children } </ ThemedView > }
3132 </ ThemedView >
32- ) ;
33+ )
3334}
3435
3536const styles = StyleSheet . create ( {
@@ -42,4 +43,4 @@ const styles = StyleSheet.create({
4243 marginTop : 6 ,
4344 marginLeft : 24 ,
4445 } ,
45- } ) ;
46+ } )
0 commit comments