Skip to content

Commit fe0bf8c

Browse files
committed
chore: update example
1 parent 41b3830 commit fe0bf8c

4 files changed

Lines changed: 12 additions & 8 deletions

File tree

android/src/main/java/com/lodev09/truesheet/TrueSheetViewController.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ class TrueSheetViewController(private val reactContext: ThemedReactContext) :
759759
KeyboardUtils.dismiss(reactContext)
760760

761761
// Clear focus from any focused view within the sheet to prevent
762-
// Android from auto-focusing the next focusable view on the main
762+
// Android from autofocusing the next focusable view on the main
763763
// screen when the sheet is removed from the hierarchy.
764764
sheetView?.findFocus()?.clearFocus()
765765
}

example/shared/src/components/DemoContent.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { StyleSheet, View, type ColorValue, type ViewProps, Text } from 'react-native';
1+
import { StyleSheet, Pressable, type ColorValue, type PressableProps, Text } from 'react-native';
22
import { BORDER_RADIUS, LIGHT_GRAY, SPACING } from '../utils';
33

4-
interface DemoContentProps extends ViewProps {
4+
interface DemoContentProps extends PressableProps {
55
radius?: number;
66
color?: ColorValue;
77
text?: string;
@@ -10,12 +10,16 @@ interface DemoContentProps extends ViewProps {
1010
export const DemoContent = (props: DemoContentProps) => {
1111
const { text, radius = BORDER_RADIUS, style: $style, color = 'rgba(0,0,0,0.3)', ...rest } = props;
1212
return (
13-
<View
14-
style={[styles.content, { backgroundColor: color, borderRadius: radius }, $style]}
13+
<Pressable
14+
style={(state) => [
15+
styles.content,
16+
{ backgroundColor: color, borderRadius: radius, opacity: state.pressed ? 0.5 : 1 },
17+
typeof $style === 'function' ? $style(state) : $style,
18+
]}
1519
{...rest}
1620
>
1721
{text && <Text style={styles.text}>{text}</Text>}
18-
</View>
22+
</Pressable>
1923
);
2024
};
2125

example/shared/src/components/sheets/FlatListSheet.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const styles = StyleSheet.create({
7676
},
7777
content: {
7878
padding: SPACING,
79-
paddingTop: HEADER_HEIGHT,
79+
paddingTop: HEADER_HEIGHT + SPACING,
8080
paddingBottom: FOOTER_HEIGHT + SPACING,
8181
},
8282
});

example/shared/src/components/sheets/ScrollViewSheet.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ ScrollViewSheet.displayName = 'ScrollViewSheet';
109109
const styles = StyleSheet.create({
110110
content: {
111111
padding: SPACING,
112-
paddingTop: HEADER_HEIGHT,
112+
paddingTop: HEADER_HEIGHT + SPACING,
113113
paddingBottom: FOOTER_HEIGHT + SPACING,
114114
gap: GAP,
115115
},

0 commit comments

Comments
 (0)