-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NativeWind UI setup and removal of some default UI components.
- Loading branch information
1 parent
1e945e3
commit 7a3622e
Showing
30 changed files
with
2,906 additions
and
1,375 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
legacy-peer-deps=true |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Heading } from "@/components/ui/heading"; | ||
import { Text } from "@/components/ui/text"; | ||
import { View } from "react-native"; | ||
import { SafeAreaView } from "react-native-safe-area-context"; | ||
|
||
export default function HomeScreen() { | ||
return ( | ||
<SafeAreaView> | ||
<View className={"h-[150px] bg-red-500 items-center justify-center"}> | ||
<Text> | ||
Hello World | ||
</Text> | ||
</View> | ||
<View className={"flex-1 items-center justify-center"}> | ||
<Heading size="2xl">Welcome to HabitForge</Heading> | ||
<Text> | ||
Welcome! You’re about to discover a whole new way of creating positive change in your life, one step at a time. HabitForge was designed to help you build routines that last, by focusing on what truly matters: steady progress and genuine commitment. | ||
</Text> | ||
<Text> | ||
We believe the best habits are formed when you start small and allow your efforts to grow naturally. Whether you want to read more, exercise consistently, or learn a new skill, HabitForge makes the process simple, approachable, and—most importantly—sustainable. | ||
</Text> | ||
</View> | ||
</SafeAreaView> | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module.exports = function(api) { | ||
api.cache(true); | ||
|
||
return { | ||
presets: [["babel-preset-expo", { | ||
jsxImportSource: "nativewind" | ||
}], "nativewind/babel"], | ||
|
||
plugins: [["module-resolver", { | ||
root: ["./"], | ||
|
||
alias: { | ||
"@": "./", | ||
"tailwind.config": "./tailwind.config.js" | ||
} | ||
}]] | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react'; | ||
import { View, ViewProps } from 'react-native'; | ||
|
||
import type { VariantProps } from '@gluestack-ui/nativewind-utils'; | ||
import { boxStyle } from './styles'; | ||
|
||
type IBoxProps = ViewProps & | ||
VariantProps<typeof boxStyle> & { className?: string }; | ||
|
||
const Box = React.forwardRef<React.ElementRef<typeof View>, IBoxProps>( | ||
({ className, ...props }, ref) => { | ||
return ( | ||
<View ref={ref} {...props} className={boxStyle({ class: className })} /> | ||
); | ||
} | ||
); | ||
|
||
Box.displayName = 'Box'; | ||
export { Box }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react'; | ||
import { boxStyle } from './styles'; | ||
|
||
import type { VariantProps } from '@gluestack-ui/nativewind-utils'; | ||
|
||
type IBoxProps = React.ComponentPropsWithoutRef<'div'> & | ||
VariantProps<typeof boxStyle> & { className?: string }; | ||
|
||
const Box = React.forwardRef<HTMLDivElement, IBoxProps>( | ||
({ className, ...props }, ref) => { | ||
return ( | ||
<div ref={ref} className={boxStyle({ class: className })} {...props} /> | ||
); | ||
} | ||
); | ||
|
||
Box.displayName = 'Box'; | ||
export { Box }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { tva } from '@gluestack-ui/nativewind-utils/tva'; | ||
import { isWeb } from '@gluestack-ui/nativewind-utils/IsWeb'; | ||
|
||
const baseStyle = isWeb | ||
? 'flex flex-col relative z-0 box-border border-0 list-none min-w-0 min-h-0 bg-transparent items-stretch m-0 p-0 text-decoration-none' | ||
: ''; | ||
|
||
export const boxStyle = tva({ | ||
base: baseStyle, | ||
}); |
Oops, something went wrong.