Skip to content

Commit

Permalink
chore: fix shadownode component name declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
azimgd committed Nov 17, 2024
1 parent 989cfe9 commit 5544b40
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

namespace facebook::react {

extern const char SLElementComponentName[] = "SLElement";

}
12 changes: 8 additions & 4 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useRef, useCallback } from 'react';
import { SafeAreaView, StyleSheet, Text } from 'react-native';
import { SafeAreaView, StyleSheet, Text, View } from 'react-native';
import type { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
import {
Shadowlist,
Expand All @@ -19,9 +19,11 @@ const ListFooterComponent = () => <Text style={styles.text}>Footer</Text>;

const renderItem: ShadowlistProps['renderItem'] = ({ item, index }) => {
return (
<Text style={styles.text} key={index}>
{index} - {item.id} - {item.text}
</Text>
<View style={styles.element}>
<Text style={styles.text}>
{index} - {item.id} - {item.text}
</Text>
</View>
);
};

Expand Down Expand Up @@ -81,6 +83,8 @@ const styles = StyleSheet.create({
},
text: {
color: 'white',
},
element: {
padding: 16,
borderBottomColor: '#333333',
borderBottomWidth: 1,
Expand Down

0 comments on commit 5544b40

Please sign in to comment.