-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
1 parent
dce69e0
commit b83600b
Showing
55 changed files
with
1,121 additions
and
345 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
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,8 @@ | ||
module.exports = { | ||
bracketSpacing: true, | ||
jsxBracketSameLine: false, | ||
singleQuote: false, | ||
trailingComma: "all", | ||
tabWidth: 2, | ||
semi: true, | ||
}; |
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
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
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,98 +1,53 @@ | ||
import { Platform, ViewStyle, StyleSheet } from "react-native"; | ||
import { | ||
ScreenWidth, | ||
isIPhoneXFamily, | ||
} from "@freakycoder/react-native-helpers"; | ||
import { ViewStyle, ImageStyle, TextStyle, StyleSheet } from "react-native"; | ||
|
||
interface Style { | ||
center: ViewStyle; | ||
searchStyle: ViewStyle; | ||
containerGlue: ViewStyle; | ||
textInputContainer: ViewStyle; | ||
} | ||
|
||
export function container(props: any) { | ||
const { | ||
height = 35, | ||
width = ScreenWidth * 0.93, | ||
backgroundColor = "#fff", | ||
borderRadius = 10, | ||
} = props; | ||
|
||
return { | ||
width: width, | ||
height: height, | ||
borderRadius, | ||
backgroundColor, | ||
paddingLeft: 8, | ||
paddingRight: 8, | ||
}; | ||
} | ||
|
||
export function textInputStyle( | ||
fontSize: number = 13, | ||
fontColor: string = "#b3b6c3", | ||
height: number = 35, | ||
width: number = ScreenWidth * 0.7 | ||
) { | ||
return { | ||
...Platform.select({ | ||
android: { | ||
padding: 0, | ||
margin: 0, | ||
borderWidth: 0, | ||
}, | ||
ios: { | ||
bottom: 0, | ||
}, | ||
}), | ||
flex: 1, | ||
marginLeft: 24, | ||
color: fontColor, | ||
fontSize: fontSize, | ||
maxHeight: height - 8, | ||
maxWidth: width * 0.75, | ||
}; | ||
} | ||
|
||
export function _shadowStyle(shadowColor: string = "#757575") { | ||
return { | ||
...Platform.select({ | ||
ios: { | ||
shadowColor, | ||
shadowRadius: 5, | ||
shadowOpacity: 0.3, | ||
shadowOffset: { width: 2, height: 1 }, | ||
}, | ||
android: { elevation: 5 }, | ||
}), | ||
}; | ||
} | ||
|
||
export function ifIPhoneXHeader(noExtraMargin: boolean) { | ||
if (noExtraMargin) return { marginTop: 16 }; | ||
return { | ||
marginTop: isIPhoneXFamily() ? 44 : 16, | ||
}; | ||
container: ViewStyle; | ||
searchContainer: ViewStyle; | ||
searchIconImageStyle: ImageStyle; | ||
textInputStyle: TextStyle; | ||
cancelIconImageStyle: ImageStyle; | ||
cancelIconContainer: ViewStyle; | ||
spinnerContainer: ViewStyle; | ||
} | ||
|
||
export default StyleSheet.create<Style>({ | ||
containerGlue: { | ||
flex: 1, | ||
container: { | ||
height: 40, | ||
width: "90%", | ||
borderRadius: 12, | ||
alignSelf: "center", | ||
flexDirection: "row", | ||
justifyContent: "space-between", | ||
alignItems: "center", | ||
backgroundColor: "#fff", | ||
shadowRadius: 8, | ||
shadowOpacity: 0.3, | ||
shadowColor: "#757575", | ||
shadowOffset: { | ||
width: 0, | ||
height: 3, | ||
}, | ||
}, | ||
searchStyle: { | ||
flex: 1, | ||
flexDirection: "row", | ||
searchContainer: { | ||
marginLeft: 12, | ||
}, | ||
textInputContainer: { | ||
flex: 1, | ||
alignItems: "center", | ||
justifyContent: "center", | ||
searchIconImageStyle: { | ||
width: 18, | ||
height: 18, | ||
}, | ||
center: { | ||
alignSelf: "center", | ||
alignContent: "center", | ||
textInputStyle: { | ||
width: "80%", | ||
marginLeft: 12, | ||
color: "#19191a", | ||
}, | ||
cancelIconImageStyle: { | ||
width: 18, | ||
height: 18, | ||
}, | ||
cancelIconContainer: { | ||
marginRight: 8, | ||
marginLeft: "auto", | ||
}, | ||
spinnerContainer: { | ||
marginLeft: 12, | ||
}, | ||
}); |
Oops, something went wrong.