Skip to content
This repository has been archived by the owner on Apr 16, 2019. It is now read-only.

Commit

Permalink
Update documentation for Turkish also updated English docs URls
Browse files Browse the repository at this point in the history
  • Loading branch information
Talut TAŞGIRAN committed Mar 5, 2018
1 parent 3f3c151 commit 363e113
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ react-native link

#### Components

- [x] CardViewWithIcon ([See documentation of usage](/docs/cardviewwithicon.md))
- [x] CardViewWithImage ([See documentation of usage](/docs/cardviewwithimage.md))
- [x] CardViewWithIcon ([See documentation of usage](/docs/en/cardviewwithicon.md))
- [x] CardViewWithImage ([See documentation of usage](/docs/en/cardviewwithimage.md))
- [ ] CardView (Place your component to inside of CardView)
- [ ] CardViewWithAnimation or Adding animation support to CardViewWithIcon, CardViewWithImage, ArticleCardView

Expand Down Expand Up @@ -66,11 +66,11 @@ Then you can give that object to style props. Card view style object can have th

#### CardViewWithIcon

*[Go to the CardViewWithIcon documentation and examples](/docs/cardviewwithicon.md)*
*[Go to the CardViewWithIcon documentation and examples](/docs/en/cardviewwithicon.md)*

#### CardViewWithImage

*[Go to the CardViewWithImage documentation and examples](/docs/cardviewwithimage.md)*
*[Go to the CardViewWithImage documentation and examples](/docs/en/cardviewwithimage.md)*

## v0.2.0 Features

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions index.js
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
};
67 changes: 67 additions & 0 deletions libs/cardView/index.js
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

0 comments on commit 363e113

Please sign in to comment.