-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-structre of the library. All icons are able to disable now except …
…main iocn
- Loading branch information
1 parent
84da8e1
commit 3dcdfd6
Showing
14 changed files
with
174 additions
and
154 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
File renamed without changes.
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,82 @@ | ||
import React, { Component } from "react"; | ||
import { View } from "react-native"; | ||
/** | ||
* ? Local Imports | ||
*/ | ||
import styles from "./BottomIcons.style"; | ||
import MiniButton from "../MiniButton/MiniButton"; | ||
import MainIconButtonStyle from "../MainIconButton/MainIconButton.style"; | ||
import MainIconButton from "../MainIconButton/MainIconButton"; | ||
|
||
export default class BottomIcons extends Component { | ||
render() { | ||
const { | ||
mainIcon, | ||
mainIconColor, | ||
mainIconOnPress, | ||
mainIconGradient, | ||
disableFourthIcon, | ||
miniButtonsColor, | ||
disableFirstIcon, | ||
disableThirdIcon, | ||
disableSecondIcon, | ||
mainIconComponent, | ||
firstIconComponent, | ||
thirdIconComponent, | ||
fourthIconComponent, | ||
secondIconComponent | ||
} = this.props; | ||
|
||
return ( | ||
<View style={[styles.iconContainer]}> | ||
<View style={styles.iconStyles.main}> | ||
{!disableFirstIcon && | ||
(firstIconComponent || ( | ||
<MiniButton | ||
style={styles.iconStyles.firstIconStyle} | ||
color={miniButtonsColor} | ||
/> | ||
))} | ||
{!disableSecondIcon && | ||
(secondIconComponent || ( | ||
<MiniButton | ||
style={styles.iconStyles.secondIconStyle} | ||
color={miniButtonsColor} | ||
/> | ||
))} | ||
<View style={[MainIconButtonStyle.mainIconStyle.container]}> | ||
{mainIconComponent || ( | ||
<MainIconButton | ||
mainIcon={mainIcon} | ||
mainIconColor={mainIconColor} | ||
mainIconGradient={mainIconGradient} | ||
mainIconOnPress={mainIconOnPress} | ||
/> | ||
)} | ||
</View> | ||
{!disableThirdIcon && | ||
(thirdIconComponent || ( | ||
<MiniButton | ||
style={styles.iconStyles.thirdIconStyle} | ||
color={miniButtonsColor} | ||
/> | ||
))} | ||
{!disableFourthIcon && | ||
(fourthIconComponent || ( | ||
<MiniButton | ||
style={styles.iconStyles.fourthIconStyle} | ||
color={miniButtonsColor} | ||
/> | ||
))} | ||
</View> | ||
</View> | ||
); | ||
} | ||
} | ||
|
||
BottomIcons.defaultProps = { | ||
disableFirstIcon: false, | ||
disableSecondIcon: false, | ||
disableThirdIcon: false, | ||
disableFourthIcon: false | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { Platform } from "react-native"; | ||
import colors from "../styles/colors"; | ||
|
||
export default { | ||
mainIconStyle: { | ||
container: { | ||
...Platform.select({ | ||
ios: { | ||
bottom: 15, | ||
alignItems: "center", | ||
justifyContent: "center" | ||
}, | ||
android: { | ||
bottom: 5, | ||
alignItems: "center", | ||
justifyContent: "center" | ||
} | ||
}) | ||
}, | ||
button: { | ||
...Platform.select({ | ||
ios: { | ||
width: 70, | ||
height: 70, | ||
borderRadius: 35, | ||
position: "absolute", | ||
shadowColor: colors.theme.light.shadowColor, | ||
shadowOffset: { width: 2, height: 3 }, | ||
shadowOpacity: 0.3, | ||
shadowRadius: 3 | ||
}, | ||
android: { | ||
width: 70, | ||
height: 70, | ||
borderRadius: 35, | ||
position: "relative", | ||
alignItems: "center", | ||
justifyContent: "center", | ||
backgroundColor: colors.theme.light.primary | ||
} | ||
}) | ||
} | ||
}, | ||
container: { | ||
position: "relative", | ||
alignItems: "center", | ||
justifyContent: "center", | ||
elevation: 5, | ||
shadowRadius: 3, | ||
shadowOpacity: 0.3, | ||
shadowColor: "#000", | ||
shadowOffset: { width: 0, height: 2 } | ||
}, | ||
iconContainer: { | ||
alignItems: "center", | ||
justifyContent: "center", | ||
marginTop: Platform.OS === "ios" ? 15 : 0 | ||
} | ||
}; |
9 changes: 6 additions & 3 deletions
9
lib/src/components/MiniButton.js → lib/src/components/MiniButton/MiniButton.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
File renamed without changes.
14 changes: 6 additions & 8 deletions
14
lib/src/components/Shape.js → lib/src/components/Shape/Shape.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
Oops, something went wrong.