Retrait des points-virgules finaux

This commit is contained in:
2024-12-07 10:24:41 +01:00
parent ab180a12ce
commit 2ad2063339
20 changed files with 101 additions and 103 deletions

View File

@@ -1,12 +1,11 @@
import { Text, type TextProps, StyleSheet } from 'react-native';
import { useThemeColor } from '@/hooks/useThemeColor';
import { Text, type TextProps, StyleSheet } from 'react-native'
import { useThemeColor } from '@/hooks/useThemeColor'
export type ThemedTextProps = TextProps & {
lightColor?: string;
darkColor?: string;
type?: 'default' | 'title' | 'defaultSemiBold' | 'subtitle' | 'link';
};
lightColor?: string
darkColor?: string
type?: 'default' | 'title' | 'defaultSemiBold' | 'subtitle' | 'link'
}
export function ThemedText({
style,
@@ -15,7 +14,7 @@ export function ThemedText({
type = 'default',
...rest
}: ThemedTextProps) {
const color = useThemeColor({ light: lightColor, dark: darkColor }, 'text');
const color = useThemeColor({ light: lightColor, dark: darkColor }, 'text')
return (
<Text
@@ -30,7 +29,7 @@ export function ThemedText({
]}
{...rest}
/>
);
)
}
const styles = StyleSheet.create({
@@ -57,4 +56,4 @@ const styles = StyleSheet.create({
fontSize: 16,
color: '#0a7ea4',
},
});
})

View File

@@ -1,14 +1,13 @@
import { View, type ViewProps } from 'react-native';
import { useThemeColor } from '@/hooks/useThemeColor';
import { View, type ViewProps } from 'react-native'
import { useThemeColor } from '@/hooks/useThemeColor'
export type ThemedViewProps = ViewProps & {
lightColor?: string;
darkColor?: string;
};
lightColor?: string
darkColor?: string
}
export function ThemedView({ style, lightColor, darkColor, ...otherProps }: ThemedViewProps) {
const backgroundColor = useThemeColor({ light: lightColor, dark: darkColor }, 'background');
const backgroundColor = useThemeColor({ light: lightColor, dark: darkColor }, 'background')
return <View style={[{ backgroundColor }, style]} {...otherProps} />;
return <View style={[{ backgroundColor }, style]} {...otherProps} />
}

View File

@@ -1,10 +1,10 @@
import * as React from 'react';
import renderer from 'react-test-renderer';
import * as React from 'react'
import renderer from 'react-test-renderer'
import { ThemedText } from '../ThemedText';
import { ThemedText } from '../ThemedText'
it(`renders correctly`, () => {
const tree = renderer.create(<ThemedText>Snapshot test!</ThemedText>).toJSON();
const tree = renderer.create(<ThemedText>Snapshot test!</ThemedText>).toJSON()
expect(tree).toMatchSnapshot();
});
expect(tree).toMatchSnapshot()
})

View File

@@ -21,4 +21,4 @@ exports[`renders correctly 1`] = `
>
Snapshot test!
</Text>
`;
`