-
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.
- Loading branch information
“T3sultan”
committed
Apr 15, 2022
1 parent
0c02abf
commit 9eaf80f
Showing
3 changed files
with
84 additions
and
4 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 |
---|---|---|
@@ -1,11 +1,88 @@ | ||
import { StyleSheet, Text as RNText } from "react-native"; | ||
import React from "react"; | ||
import { moderateScale } from "react-native-size-matters"; | ||
import { Colors, Fonts } from "../theme"; | ||
|
||
const CustomText = props => { | ||
const { children } = props; | ||
return <RNText>{children}</RNText>; | ||
const { | ||
children, | ||
small, | ||
body, | ||
caption, | ||
title, | ||
header, | ||
headLine, | ||
display, | ||
jumbo, | ||
mega, | ||
nunitoBlack, | ||
nunitoBold, | ||
primaryColor, | ||
antiquewhite, | ||
aqua, | ||
deeppink, | ||
black, | ||
underLine, | ||
centered, | ||
alginRight, | ||
alginLeft, | ||
fwNormal, | ||
fw500, | ||
fw600, | ||
fwBold, | ||
style, | ||
lh, | ||
} = props; | ||
return ( | ||
<RNText | ||
style={[ | ||
styles.textStyle, | ||
//fonts size | ||
small && { fontSize: moderateScale(Fonts.size.small) }, | ||
body && { fontSize: moderateScale(Fonts.size.body) }, | ||
caption && { fontSize: moderateScale(Fonts.size.caption) }, | ||
header && { fontSize: moderateScale(Fonts.size.header) }, | ||
title && { fontSize: moderateScale(Fonts.size.title) }, | ||
headLine && { fontSize: moderateScale(Fonts.size.headLine) }, | ||
display && { fontSize: moderateScale(Fonts.size.display) }, | ||
jumbo && { fontSize: moderateScale(Fonts.size.jumbo) }, | ||
mega && { fontSize: moderateScale(Fonts.size.mega) }, | ||
//fonts | ||
nunitoBlack && { fontFamily: Fonts.type.nunitoBlack }, | ||
nunitoBold && { fontFamily: Fonts.type.nunitoBold }, | ||
|
||
//color | ||
black && { color: Colors.black }, | ||
deeppink && { color: Colors.deeppink }, | ||
primaryColor && { color: Colors.primaryColor }, | ||
antiquewhite && { color: Colors.antiquewhite }, | ||
aqua && { color: Colors.aqua }, | ||
|
||
//position | ||
underLine && { textDecorationLine: "underline" }, | ||
centered && { textAlign: "center" }, | ||
alginRight && { textAlign: "right" }, | ||
alginLeft && { textAlign: "left" }, | ||
fwNormal && { fontWeight: "normal" }, | ||
fw500 && { fontWeight: "500" }, | ||
fw600 && { fontWeight: "600" }, | ||
fwBold && { fontWeight: "bold" }, | ||
lh && { lineHeight: 2 }, | ||
style, | ||
]} | ||
numberOfLines={numberOfLines} | ||
> | ||
{children} | ||
</RNText> | ||
); | ||
}; | ||
|
||
export default CustomText; | ||
|
||
const styles = StyleSheet.create({}); | ||
const styles = StyleSheet.create({ | ||
textStyle: { | ||
fontSize: Fonts.size.body, | ||
fontFamily: Fonts.type.nunitoBlack, | ||
color: Colors.black, | ||
}, | ||
}); |
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,2 @@ | ||
const images = {}; | ||
export default images; |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import Colors from "./colors"; | ||
import Metrics from "./metrics"; | ||
import Fonts from "./fonts"; | ||
import Images from "./images"; | ||
|
||
export { Colors, Metrics, Fonts }; | ||
export { Colors, Metrics, Fonts, Images }; |