template_0205
This commit is contained in:
29
RN_TEMPLATE/ignite/templates/screen/NAMEScreen.tsx.ejs
Normal file
29
RN_TEMPLATE/ignite/templates/screen/NAMEScreen.tsx.ejs
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
destinationDir: app/screens
|
||||
patches:
|
||||
- path: "app/navigators/navigationTypes.ts"
|
||||
replace: "// IGNITE_GENERATOR_ANCHOR_APP_STACK_PARAM_LIST"
|
||||
insert: "<%= props.pascalCaseName %>: undefined\n // IGNITE_GENERATOR_ANCHOR_APP_STACK_PARAM_LIST"
|
||||
---
|
||||
import { FC } from "react"
|
||||
import { ViewStyle } from "react-native"
|
||||
import type { AppStackScreenProps } from "@/navigators/navigationTypes"
|
||||
import { Screen } from "@/components/Screen"
|
||||
import { Text } from "@/components/Text"
|
||||
// import { useNavigation } from "@react-navigation/native"
|
||||
|
||||
interface <%= props.pascalCaseName %>ScreenProps extends AppStackScreenProps<"<%= props.pascalCaseName %>"> {}
|
||||
|
||||
export const <%= props.pascalCaseName %>Screen: FC<<%= props.pascalCaseName %>ScreenProps> = () => {
|
||||
// Pull in navigation via hook
|
||||
// const navigation = useNavigation()
|
||||
return (
|
||||
<Screen style={$root} preset="scroll">
|
||||
<Text text="<%= props.camelCaseName %>" />
|
||||
</Screen>
|
||||
)
|
||||
}
|
||||
|
||||
const $root: ViewStyle = {
|
||||
flex: 1,
|
||||
}
|
||||
Reference in New Issue
Block a user