template_0205
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
BIN
RN_TEMPLATE/ignite/templates/app-icon/android-legacy.png
Normal file
BIN
RN_TEMPLATE/ignite/templates/app-icon/android-legacy.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
BIN
RN_TEMPLATE/ignite/templates/app-icon/ios-universal.png
Normal file
BIN
RN_TEMPLATE/ignite/templates/app-icon/ios-universal.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
39
RN_TEMPLATE/ignite/templates/component/NAME.tsx.ejs
Normal file
39
RN_TEMPLATE/ignite/templates/component/NAME.tsx.ejs
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
destinationDir: app/components/<%= props.subdirectory %>
|
||||
---
|
||||
import { StyleProp, TextStyle, View, ViewStyle } from "react-native"
|
||||
import { useAppTheme } from "@/theme/context"
|
||||
import type { ThemedStyle } from "@/theme/types"
|
||||
import { Text } from "@/components/Text"
|
||||
|
||||
export interface <%= props.pascalCaseName %>Props {
|
||||
/**
|
||||
* An optional style override useful for padding & margin.
|
||||
*/
|
||||
style?: StyleProp<ViewStyle>
|
||||
}
|
||||
|
||||
/**
|
||||
* Describe your component here
|
||||
*/
|
||||
export const <%= props.pascalCaseName %> = (props: <%= props.pascalCaseName %>Props) => {
|
||||
const { style } = props
|
||||
const $styles = [$container, style]
|
||||
const { themed } = useAppTheme();
|
||||
|
||||
return (
|
||||
<View style={$styles}>
|
||||
<Text style={themed($text)}>Hello</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
const $container: ViewStyle = {
|
||||
justifyContent: "center",
|
||||
}
|
||||
|
||||
const $text: ThemedStyle<TextStyle> = ({ colors, typography }) => ({
|
||||
fontFamily: typography.primary.normal,
|
||||
fontSize: 14,
|
||||
color: colors.palette.primary500,
|
||||
})
|
||||
18
RN_TEMPLATE/ignite/templates/navigator/NAMENavigator.tsx.ejs
Normal file
18
RN_TEMPLATE/ignite/templates/navigator/NAMENavigator.tsx.ejs
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
destinationDir: app/navigators
|
||||
---
|
||||
import { createNativeStackNavigator } from "@react-navigation/native-stack"
|
||||
import { WelcomeScreen } from "@/screens/WelcomeScreen"
|
||||
|
||||
export type <%= props.pascalCaseName %>NavigatorParamList = {
|
||||
Demo: undefined
|
||||
}
|
||||
|
||||
const Stack = createNativeStackNavigator<<%= props.pascalCaseName %>NavigatorParamList>()
|
||||
export const <%= props.pascalCaseName %>Navigator = () => {
|
||||
return (
|
||||
<Stack.Navigator screenOptions={{ cardStyle: { backgroundColor: "transparent" }, headerShown: false, }}>
|
||||
<Stack.Screen name="Demo" component={WelcomeScreen} />
|
||||
</Stack.Navigator>
|
||||
)
|
||||
}
|
||||
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,
|
||||
}
|
||||
BIN
RN_TEMPLATE/ignite/templates/splash-screen/logo.png
Normal file
BIN
RN_TEMPLATE/ignite/templates/splash-screen/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 78 KiB |
Reference in New Issue
Block a user