-
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.
chore: tabs refactor and component outsource
- Loading branch information
Showing
6 changed files
with
72 additions
and
12 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 |
---|---|---|
|
@@ -37,3 +37,5 @@ yarn-error.* | |
android | ||
ios | ||
|
||
.idea | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,5 @@ | ||
import { View } from 'react-native'; | ||
|
||
export function TabbarBackground() { | ||
return <View className='shadow-md shadow-slate-500/30 w-full h-full bg-white rounded-xl' />; | ||
} |
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,13 @@ | ||
import { Feather } from '@expo/vector-icons'; | ||
|
||
import { colors } from '../../theme/colors'; | ||
|
||
export function TabbarIcon({ | ||
focused, | ||
name, | ||
}: { | ||
focused: boolean; | ||
name: React.ComponentProps<typeof Feather>['name']; | ||
}) { | ||
return <Feather name={name} size={30} color={focused ? colors.primary['500'] : 'gray'} />; | ||
} |
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,20 @@ | ||
import { PropsWithChildren } from 'react'; | ||
|
||
import { StyledText } from '../base/text'; | ||
|
||
interface TabbarLabelProps extends PropsWithChildren { | ||
color: string; | ||
} | ||
|
||
export function TabbarLabel({ color, children }: TabbarLabelProps) { | ||
return ( | ||
<StyledText | ||
className='text-xs' | ||
style={{ | ||
color, | ||
}} | ||
> | ||
{children} | ||
</StyledText> | ||
); | ||
} |