├── src ├── types │ └── nativewind-env.d.ts ├── styles │ ├── global.css │ └── colors.ts ├── assets │ ├── expo.png │ ├── banner.png │ ├── javascript.png │ ├── nativewind.png │ ├── react-native.png │ └── typescript.png ├── lib │ └── utils.ts ├── components │ ├── Title.tsx │ ├── Switch.tsx │ ├── Skills.tsx │ ├── User.tsx │ ├── Preferences.tsx │ ├── Option.tsx │ ├── Input.tsx │ ├── Badge.tsx │ ├── Checkbox.tsx │ ├── Avatar.tsx │ ├── Button.tsx │ └── Toast.tsx ├── utils │ └── skills.ts └── app │ └── Profile.tsx ├── assets ├── icon.png ├── splash.png ├── favicon.png └── adaptive-icon.png ├── tsconfig.json ├── babel.config.js ├── metro.config.js ├── tailwind.config.js ├── App.tsx ├── .gitignore ├── app.json └── package.json /src/types/nativewind-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/nativecn-app/HEAD/assets/icon.png -------------------------------------------------------------------------------- /assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/nativecn-app/HEAD/assets/splash.png -------------------------------------------------------------------------------- /src/styles/global.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/nativecn-app/HEAD/assets/favicon.png -------------------------------------------------------------------------------- /src/assets/expo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/nativecn-app/HEAD/src/assets/expo.png -------------------------------------------------------------------------------- /src/assets/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/nativecn-app/HEAD/src/assets/banner.png -------------------------------------------------------------------------------- /assets/adaptive-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/nativecn-app/HEAD/assets/adaptive-icon.png -------------------------------------------------------------------------------- /src/assets/javascript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/nativecn-app/HEAD/src/assets/javascript.png -------------------------------------------------------------------------------- /src/assets/nativewind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/nativecn-app/HEAD/src/assets/nativewind.png -------------------------------------------------------------------------------- /src/assets/react-native.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/nativecn-app/HEAD/src/assets/react-native.png -------------------------------------------------------------------------------- /src/assets/typescript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orodrigogo/nativecn-app/HEAD/src/assets/typescript.png -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "expo/tsconfig.base", 3 | "compilerOptions": { 4 | "strict": true, 5 | "paths": { 6 | "@/*": ["./src/*"] 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from "clsx" 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(...inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /src/components/Title.tsx: -------------------------------------------------------------------------------- 1 | import { Text, TextProps } from "react-native" 2 | 3 | export function Title(props: TextProps) { 4 | return 5 | } 6 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function (api) { 2 | api.cache(true) 3 | return { 4 | presets: [ 5 | ["babel-preset-expo", { jsxImportSource: "nativewind" }], 6 | "nativewind/babel", 7 | ], 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /metro.config.js: -------------------------------------------------------------------------------- 1 | const { getDefaultConfig } = require("expo/metro-config") 2 | const { withNativeWind } = require("nativewind/metro") 3 | 4 | const config = getDefaultConfig(__dirname) 5 | 6 | module.exports = withNativeWind(config, { input: "./src/styles/global.css" }) 7 | -------------------------------------------------------------------------------- /src/styles/colors.ts: -------------------------------------------------------------------------------- 1 | export const colors = { 2 | white: "#FFFFFF", 3 | black: "#000000", 4 | 5 | green: { 6 | 400: "#70E1C1", 7 | 500: "#3ECF8F", 8 | }, 9 | 10 | gray: { 11 | 400: "#707070", 12 | 500: "#2D2D2D", 13 | 600: "#232323", 14 | 700: "#1C1C1C", 15 | 800: "#161616", 16 | }, 17 | } 18 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | import { colors } from "./src/styles/colors" 2 | 3 | /** @type {import('tailwindcss').Config} */ 4 | module.exports = { 5 | content: ["./src/**/*.{js,jsx,ts,tsx}"], 6 | presets: [require("nativewind/preset")], 7 | theme: { 8 | extend: { 9 | colors, 10 | }, 11 | }, 12 | plugins: [], 13 | } 14 | -------------------------------------------------------------------------------- /App.tsx: -------------------------------------------------------------------------------- 1 | import "@/styles/global.css" 2 | 3 | import { StatusBar } from "expo-status-bar" 4 | import { ToastProvider } from "@/components/Toast" 5 | 6 | import { Profile } from "@/app/Profile" 7 | 8 | export default function App() { 9 | return ( 10 | 11 | 12 | 13 | 14 | ) 15 | } 16 | -------------------------------------------------------------------------------- /src/utils/skills.ts: -------------------------------------------------------------------------------- 1 | export const SKILLS = [ 2 | { name: "React Native", icon: require("@/assets/react-native.png") }, 3 | { name: "Typescript", icon: require("@/assets/typescript.png") }, 4 | { name: "Javascript", icon: require("@/assets/javascript.png") }, 5 | { name: "Nativewind", icon: require("@/assets/nativewind.png") }, 6 | { name: "Expo", icon: require("@/assets/expo.png") }, 7 | ] 8 | -------------------------------------------------------------------------------- /src/components/Switch.tsx: -------------------------------------------------------------------------------- 1 | import { Switch as NativeSwitch } from "react-native" 2 | 3 | import { colors } from "@/styles/colors" 4 | 5 | function Switch({ 6 | ...props 7 | }: React.ComponentPropsWithoutRef) { 8 | return ( 9 | 17 | ) 18 | } 19 | 20 | export { Switch } 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files 2 | 3 | # dependencies 4 | node_modules/ 5 | 6 | # Expo 7 | .expo/ 8 | dist/ 9 | web-build/ 10 | 11 | # Native 12 | *.orig.* 13 | *.jks 14 | *.p8 15 | *.p12 16 | *.key 17 | *.mobileprovision 18 | 19 | # Metro 20 | .metro-health-check* 21 | 22 | # debug 23 | npm-debug.* 24 | yarn-debug.* 25 | yarn-error.* 26 | 27 | # macOS 28 | .DS_Store 29 | *.pem 30 | 31 | # local env files 32 | .env*.local 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | -------------------------------------------------------------------------------- /src/components/Skills.tsx: -------------------------------------------------------------------------------- 1 | import { View } from "react-native" 2 | 3 | import { SKILLS } from "@/utils/skills" 4 | import { Title } from "@/components/Title" 5 | import { Badge } from "./Badge" 6 | 7 | export function Skills() { 8 | return ( 9 | 10 | Skills 11 | 12 | 13 | {SKILLS.map((skill) => ( 14 | 15 | ))} 16 | 17 | 18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /src/components/User.tsx: -------------------------------------------------------------------------------- 1 | import { Text, View } from "react-native" 2 | import { Avatar, AvatarFallback, AvatarImage } from "./Avatar" 3 | 4 | export function User() { 5 | return ( 6 | 7 | 8 | 9 | RG 10 | 11 | 12 | 13 | Rodrigo Gonçalves 14 | 15 | 16 | @orodrigogo 17 | 18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "nativecn-app", 4 | "slug": "nativecn-app", 5 | "version": "1.0.0", 6 | "orientation": "portrait", 7 | "icon": "./assets/icon.png", 8 | "userInterfaceStyle": "light", 9 | "splash": { 10 | "image": "./assets/splash.png", 11 | "resizeMode": "contain", 12 | "backgroundColor": "#ffffff" 13 | }, 14 | "assetBundlePatterns": [ 15 | "**/*" 16 | ], 17 | "ios": { 18 | "supportsTablet": true 19 | }, 20 | "android": { 21 | "adaptiveIcon": { 22 | "foregroundImage": "./assets/adaptive-icon.png", 23 | "backgroundColor": "#ffffff" 24 | } 25 | }, 26 | "web": { 27 | "favicon": "./assets/favicon.png" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nativecn-app", 3 | "version": "1.0.0", 4 | "main": "node_modules/expo/AppEntry.js", 5 | "scripts": { 6 | "start": "expo start", 7 | "android": "expo start --android", 8 | "ios": "expo start --ios", 9 | "web": "expo start --web" 10 | }, 11 | "dependencies": { 12 | "class-variance-authority": "^0.7.0", 13 | "clsx": "^2.1.0", 14 | "expo": "~50.0.11", 15 | "expo-status-bar": "~1.11.1", 16 | "nativewind": "^4.0.36", 17 | "react": "18.2.0", 18 | "react-native": "0.73.4", 19 | "react-native-reanimated": "~3.6.2", 20 | "tailwind-merge": "^2.2.1" 21 | }, 22 | "devDependencies": { 23 | "@babel/core": "^7.20.0", 24 | "@types/react": "~18.2.45", 25 | "tailwindcss": "^3.4.1", 26 | "typescript": "^5.1.3" 27 | }, 28 | "private": true 29 | } 30 | -------------------------------------------------------------------------------- /src/components/Preferences.tsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react" 2 | import { View } from "react-native" 3 | 4 | import { Title } from "@/components/Title" 5 | import { Option } from "@/components/Option" 6 | import { Switch } from "@/components/Switch" 7 | import { Checkbox } from "@/components/Checkbox" 8 | 9 | export function Preferences() { 10 | const [isEnabled, setIsEnabled] = useState(false) 11 | return ( 12 | 13 | Preferences 14 | 15 | 20 | 21 | 26 | 27 | ) 28 | } 29 | -------------------------------------------------------------------------------- /src/components/Option.tsx: -------------------------------------------------------------------------------- 1 | import { ReactNode } from "react" 2 | import { Text, View, TextProps } from "react-native" 3 | import { MaterialIcons } from "@expo/vector-icons" 4 | 5 | import { colors } from "@/styles/colors" 6 | 7 | interface OptionProps { 8 | children: ReactNode 9 | } 10 | 11 | interface IconProps { 12 | icon: keyof typeof MaterialIcons.glyphMap 13 | } 14 | 15 | function Option({ children }: OptionProps) { 16 | return ( 17 | 18 | {children} 19 | 20 | ) 21 | } 22 | 23 | function Icon({ icon }: IconProps) { 24 | return 25 | } 26 | 27 | function Title({ ...rest }: TextProps) { 28 | return 29 | } 30 | 31 | Option.Title = Title 32 | Option.Icon = Icon 33 | 34 | export { Option } 35 | -------------------------------------------------------------------------------- /src/components/Input.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef } from "react" 2 | import { Text, TextInput, View } from "react-native" 3 | 4 | import { cn } from "../lib/utils" 5 | import { colors } from "@/styles/colors" 6 | 7 | export interface InputProps 8 | extends React.ComponentPropsWithoutRef { 9 | label?: string 10 | labelClasses?: string 11 | inputClasses?: string 12 | } 13 | const Input = forwardRef, InputProps>( 14 | ({ className, label, labelClasses, inputClasses, ...props }, ref) => ( 15 | 16 | {label && ( 17 | 20 | {label} 21 | 22 | )} 23 | 31 | 32 | ) 33 | ) 34 | 35 | export { Input } 36 | -------------------------------------------------------------------------------- /src/app/Profile.tsx: -------------------------------------------------------------------------------- 1 | import { Image, View, ScrollView } from "react-native" 2 | 3 | import { User } from "@/components/User" 4 | import { Input } from "@/components/Input" 5 | import { Button } from "@/components/Button" 6 | import { Skills } from "@/components/Skills" 7 | import { useToast } from "@/components/Toast" 8 | import { Preferences } from "@/components/Preferences" 9 | 10 | export function Profile() { 11 | const { toast } = useToast() 12 | 13 | return ( 14 | 15 | 16 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |