forked from pjamrozowicz/react-native-settings-list
-
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.
Merge pull request #1 from swrlab/dev/fix-prop-types
Dev/fix prop types
- Loading branch information
Showing
7 changed files
with
5,246 additions
and
722 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,27 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [1.8.2] - 2022-08-15 ([swrlab](https://github.com/swrlab/react-native-settings-list)) | ||
|
||
- fix: TextPropTypes (deprecated-react-native-prop-types) | ||
- fix: ImagePropTypes (deprecated-react-native-prop-types) | ||
- chore: reformat code-base and update readme | ||
|
||
## [1.8.1] - 2022-04-26 ([swrlab](https://github.com/swrlab/react-native-settings-list)) | ||
|
||
- fix: ViewPropTypes (deprecated-react-native-prop-types) | ||
|
||
## [1.8.0] - 2019-06-29 ([pjamrozowicz](https://github.com/pjamrozowicz/react-native-settings-list)) | ||
|
||
- fix: item.type.displayName bug in release | ||
- chore: fix eslint warnings | ||
- chore: moved to hairlineWidth | ||
- chore: merge titleBoxStyle with default styles | ||
|
||
## [1.8.0] - 2017-11-04 ([evetstech](https://github.com/evetstech/react-native-settings-list)) | ||
|
||
- ... |
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,148 +1,197 @@ | ||
'use strict'; | ||
import React, { | ||
AppRegistry, | ||
Component, | ||
StyleSheet, | ||
Text, | ||
View, | ||
Image | ||
} from 'react-native'; | ||
"use strict"; | ||
|
||
import SettingsList from 'react-native-settings-list'; | ||
import React, { | ||
AppRegistry, | ||
Component, | ||
StyleSheet, | ||
Text, | ||
View, | ||
Image, | ||
} from "react-native"; | ||
|
||
import SettingsList from "react-native-settings-list"; | ||
|
||
class SettingsListExample extends Component { | ||
constructor(){ | ||
super(); | ||
} | ||
render() { | ||
return ( | ||
<View style={{backgroundColor:'#f6f6f6',flex:1}}> | ||
<View style={{borderBottomWidth:1, backgroundColor:'#263238',borderColor:'#c8c7cc'}}> | ||
<Text style={{color:'white',marginTop:15,marginBottom:15, marginLeft:15,fontWeight:'bold',fontSize:20}}>Settings</Text> | ||
</View> | ||
<View style={{backgroundColor:'#f6f6f6',flex:1}}> | ||
<SettingsList borderColor='#d6d5d9' defaultItemSize={50}> | ||
<SettingsList.Item | ||
hasNavArrow={false} | ||
title='Wireless & networks' | ||
titleStyle={{color:'#009688', marginBottom:10, fontWeight:'500'}} | ||
itemWidth={50} | ||
borderHide={'Both'} | ||
/> | ||
<SettingsList.Item | ||
icon={ | ||
<View style={styles.imageStyle}> | ||
<Image style={{alignSelf:'center',height:22, width:22}} source={require('./images/data.png')}/> | ||
</View> | ||
} | ||
hasNavArrow={false} | ||
itemWidth={70} | ||
titleStyle={{color:'black', fontSize: 16}} | ||
title='Data usage' | ||
/> | ||
<SettingsList.Item | ||
icon={ | ||
<View style={styles.imageStyle}> | ||
<Image style={{alignSelf:'center',height:4, width:18}} source={require('./images/more.png')}/> | ||
</View> | ||
} | ||
title='More' | ||
itemWidth={70} | ||
titleStyle={{color:'black', fontSize: 16}} | ||
hasNavArrow={false} | ||
/> | ||
<SettingsList.Header headerStyle={{marginTop:-5}}/> | ||
<SettingsList.Item | ||
hasNavArrow={false} | ||
title='Device' | ||
titleStyle={{color:'#009688', marginBottom:10, fontWeight:'bold'}} | ||
itemWidth={70} | ||
borderHide={'Both'} | ||
/> | ||
<SettingsList.Item | ||
icon={ | ||
<View style={styles.imageStyle}> | ||
<Image style={{alignSelf:'center',height:22, width:22}} source={require('./images/display2.png')}/> | ||
</View> | ||
} | ||
title='Display' | ||
itemWidth={70} | ||
titleStyle={{color:'black', fontSize: 16}} | ||
hasNavArrow={false} | ||
/> | ||
<SettingsList.Item | ||
icon={ | ||
<View style={styles.imageStyle}> | ||
<Image style={{alignSelf:'center',height:20, width:18}} source={require('./images/sound.png')}/> | ||
</View> | ||
} | ||
title='Sound & notification' | ||
itemWidth={70} | ||
titleStyle={{color:'black', fontSize: 16}} | ||
hasNavArrow={false} | ||
/> | ||
<SettingsList.Item | ||
icon={ | ||
<View style={styles.imageStyle}> | ||
<Image style={{alignSelf:'center',height:22, width:14}} source={require('./images/apps.png')}/> | ||
</View> | ||
} | ||
title='Apps' | ||
itemWidth={70} | ||
titleStyle={{color:'black', fontSize: 16}} | ||
hasNavArrow={false} | ||
/> | ||
<SettingsList.Item | ||
icon={ | ||
<View style={styles.imageStyle}> | ||
<Image style={{alignSelf:'center',height:14, width:20}} source={require('./images/storage.png')}/> | ||
</View> | ||
} | ||
title='Storage & USB' | ||
itemWidth={70} | ||
titleStyle={{color:'black', fontSize: 16}} | ||
hasNavArrow={false} | ||
/> | ||
<SettingsList.Item | ||
icon={ | ||
<View style={styles.imageStyle}> | ||
<Image style={{alignSelf:'center',height:22, width:14}} source={require('./images/battery.png')}/> | ||
</View> | ||
} | ||
title='Battery' | ||
itemWidth={70} | ||
titleStyle={{color:'black', fontSize: 16}} | ||
hasNavArrow={false} | ||
/> | ||
<SettingsList.Item | ||
icon={ | ||
<View style={styles.imageStyle}> | ||
<Image style={{alignSelf:'center',height:18, width:20}} source={require('./images/memory.png')}/> | ||
</View> | ||
} | ||
title='Memory' | ||
itemWidth={70} | ||
titleStyle={{color:'black', fontSize: 16}} | ||
hasNavArrow={false} | ||
/> | ||
<SettingsList.Header headerStyle={{marginTop: -5}}/> | ||
</SettingsList> | ||
</View> | ||
</View> | ||
); | ||
} | ||
constructor() { | ||
super(); | ||
} | ||
render() { | ||
return ( | ||
<View style={{ backgroundColor: "#f6f6f6", flex: 1 }}> | ||
<View | ||
style={{ | ||
borderBottomWidth: 1, | ||
backgroundColor: "#263238", | ||
borderColor: "#c8c7cc", | ||
}} | ||
> | ||
<Text | ||
style={{ | ||
color: "white", | ||
marginTop: 15, | ||
marginBottom: 15, | ||
marginLeft: 15, | ||
fontWeight: "bold", | ||
fontSize: 20, | ||
}} | ||
> | ||
Settings | ||
</Text> | ||
</View> | ||
<View style={{ backgroundColor: "#f6f6f6", flex: 1 }}> | ||
<SettingsList borderColor="#d6d5d9" defaultItemSize={50}> | ||
<SettingsList.Item | ||
hasNavArrow={false} | ||
title="Wireless & networks" | ||
titleStyle={{ | ||
color: "#009688", | ||
marginBottom: 10, | ||
fontWeight: "500", | ||
}} | ||
itemWidth={50} | ||
borderHide={"Both"} | ||
/> | ||
<SettingsList.Item | ||
icon={ | ||
<View style={styles.imageStyle}> | ||
<Image | ||
style={{ alignSelf: "center", height: 22, width: 22 }} | ||
source={require("./images/data.png")} | ||
/> | ||
</View> | ||
} | ||
hasNavArrow={false} | ||
itemWidth={70} | ||
titleStyle={{ color: "black", fontSize: 16 }} | ||
title="Data usage" | ||
/> | ||
<SettingsList.Item | ||
icon={ | ||
<View style={styles.imageStyle}> | ||
<Image | ||
style={{ alignSelf: "center", height: 4, width: 18 }} | ||
source={require("./images/more.png")} | ||
/> | ||
</View> | ||
} | ||
title="More" | ||
itemWidth={70} | ||
titleStyle={{ color: "black", fontSize: 16 }} | ||
hasNavArrow={false} | ||
/> | ||
<SettingsList.Header headerStyle={{ marginTop: -5 }} /> | ||
<SettingsList.Item | ||
hasNavArrow={false} | ||
title="Device" | ||
titleStyle={{ | ||
color: "#009688", | ||
marginBottom: 10, | ||
fontWeight: "bold", | ||
}} | ||
itemWidth={70} | ||
borderHide={"Both"} | ||
/> | ||
<SettingsList.Item | ||
icon={ | ||
<View style={styles.imageStyle}> | ||
<Image | ||
style={{ alignSelf: "center", height: 22, width: 22 }} | ||
source={require("./images/display2.png")} | ||
/> | ||
</View> | ||
} | ||
title="Display" | ||
itemWidth={70} | ||
titleStyle={{ color: "black", fontSize: 16 }} | ||
hasNavArrow={false} | ||
/> | ||
<SettingsList.Item | ||
icon={ | ||
<View style={styles.imageStyle}> | ||
<Image | ||
style={{ alignSelf: "center", height: 20, width: 18 }} | ||
source={require("./images/sound.png")} | ||
/> | ||
</View> | ||
} | ||
title="Sound & notification" | ||
itemWidth={70} | ||
titleStyle={{ color: "black", fontSize: 16 }} | ||
hasNavArrow={false} | ||
/> | ||
<SettingsList.Item | ||
icon={ | ||
<View style={styles.imageStyle}> | ||
<Image | ||
style={{ alignSelf: "center", height: 22, width: 14 }} | ||
source={require("./images/apps.png")} | ||
/> | ||
</View> | ||
} | ||
title="Apps" | ||
itemWidth={70} | ||
titleStyle={{ color: "black", fontSize: 16 }} | ||
hasNavArrow={false} | ||
/> | ||
<SettingsList.Item | ||
icon={ | ||
<View style={styles.imageStyle}> | ||
<Image | ||
style={{ alignSelf: "center", height: 14, width: 20 }} | ||
source={require("./images/storage.png")} | ||
/> | ||
</View> | ||
} | ||
title="Storage & USB" | ||
itemWidth={70} | ||
titleStyle={{ color: "black", fontSize: 16 }} | ||
hasNavArrow={false} | ||
/> | ||
<SettingsList.Item | ||
icon={ | ||
<View style={styles.imageStyle}> | ||
<Image | ||
style={{ alignSelf: "center", height: 22, width: 14 }} | ||
source={require("./images/battery.png")} | ||
/> | ||
</View> | ||
} | ||
title="Battery" | ||
itemWidth={70} | ||
titleStyle={{ color: "black", fontSize: 16 }} | ||
hasNavArrow={false} | ||
/> | ||
<SettingsList.Item | ||
icon={ | ||
<View style={styles.imageStyle}> | ||
<Image | ||
style={{ alignSelf: "center", height: 18, width: 20 }} | ||
source={require("./images/memory.png")} | ||
/> | ||
</View> | ||
} | ||
title="Memory" | ||
itemWidth={70} | ||
titleStyle={{ color: "black", fontSize: 16 }} | ||
hasNavArrow={false} | ||
/> | ||
<SettingsList.Header headerStyle={{ marginTop: -5 }} /> | ||
</SettingsList> | ||
</View> | ||
</View> | ||
); | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
imageStyle:{ | ||
marginLeft:15, | ||
marginRight:20, | ||
alignSelf:'center', | ||
width:20, | ||
height:24, | ||
justifyContent:'center' | ||
} | ||
imageStyle: { | ||
marginLeft: 15, | ||
marginRight: 20, | ||
alignSelf: "center", | ||
width: 20, | ||
height: 24, | ||
justifyContent: "center", | ||
}, | ||
}); | ||
|
||
AppRegistry.registerComponent('SettingsListExample', () => SettingsListExample); | ||
AppRegistry.registerComponent("SettingsListExample", () => SettingsListExample); |
Oops, something went wrong.