This repository has been archived by the owner on Apr 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update documentation for Turkish also updated English docs URls
- Loading branch information
Talut TAŞGIRAN
committed
Mar 5, 2018
1 parent
3f3c151
commit 363e113
Showing
5 changed files
with
73 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
File renamed without changes.
File renamed without changes.
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,7 +1,9 @@ | ||
import CardView from './libs/cardView'; | ||
import CardViewWithIcon from './libs/cardViewWithIcon'; | ||
import CardViewWithImage from './libs/cardViewWithImage'; | ||
|
||
export { | ||
CardView, | ||
CardViewWithIcon, | ||
CardViewWithImage | ||
}; |
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,67 @@ | ||
import React from 'react'; | ||
import { View, Dimensions, Text, Platform, TouchableOpacity } from 'react-native'; | ||
import PropTypes from 'prop-types'; | ||
|
||
class CardView extends React.Component { | ||
constructor(props) { | ||
super(props) | ||
} | ||
|
||
// TODO : Add shadow properties to icon - in process ♨ | ||
|
||
render() { | ||
const container = { | ||
shadowOffset : { | ||
width : Platform.OS === "ios" ? this.props.style.shadowOffsetWidth : 0, | ||
height: Platform.OS === "ios" ? this.props.style.shadowOffsetWidth : 0, | ||
}, | ||
width : this.props.style.width, | ||
margin : this.props.style.margin, | ||
shadowColor : this.props.style.shadowColor, | ||
shadowOpacity: this.props.style.shadowOpacity, | ||
shadowRadius : this.props.style.shadowRadius, | ||
elevation : Platform.OS === "android" ? this.props.elevation : undefined, | ||
}; | ||
|
||
return ( | ||
<View style={ container }> | ||
<View style={ { | ||
backgroundColor: this.props.style.bgColor, | ||
overflow : 'hidden', | ||
padding : this.props.style.padding, | ||
width : this.props.style.width, | ||
borderRadius : this.props.borderRadius, | ||
} }> | ||
<TouchableOpacity onPress={ this.props.onPress }> | ||
{ this.props.children } | ||
</TouchableOpacity> | ||
</View> | ||
</View> | ||
) | ||
} | ||
} | ||
|
||
|
||
CardView.defaultProps = { | ||
style: { | ||
shadowColor : '#000000', | ||
shadowOffsetWidth : 3, | ||
shadowOffsetHeight: 3, | ||
shadowOpacity : 0.3, | ||
shadowRadius : 3, | ||
bgColor : '#ffffff', | ||
padding : 5, | ||
margin : 10, | ||
borderRadius : 3, | ||
width : 300, | ||
elevation : 3, | ||
}, | ||
}; | ||
CardView.propTypes = { | ||
style : PropTypes.object, | ||
onPress : PropTypes.func, | ||
borderRadius: PropTypes.number, | ||
elevation : PropTypes.number | ||
}; | ||
|
||
export default CardView |