mirror of
https://github.com/zhigang1992/react-native-card-stack-swiper.git
synced 2026-01-12 22:50:14 +08:00
31 lines
740 B
JavaScript
31 lines
740 B
JavaScript
import React, { Component } from 'react';
|
|
import PropTypes from 'prop-types'
|
|
import {
|
|
View,
|
|
} from 'react-native';
|
|
|
|
const Card = ({ style, children }) => (
|
|
<View style={style} >
|
|
{children}
|
|
</View>);
|
|
|
|
Card.propTypes = {
|
|
children: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).isRequired,
|
|
style: PropTypes.oneOfType([PropTypes.number, PropTypes.object, PropTypes.array]),
|
|
onSwipedLeft: PropTypes.func,
|
|
onSwipedRight:PropTypes.func,
|
|
onSwipedTop: PropTypes.func,
|
|
onSwipedBottom: PropTypes.func,
|
|
onSwiped: PropTypes.func,
|
|
}
|
|
Card.defaultProps = {
|
|
style:{},
|
|
onSwiped: () => {},
|
|
onSwipedLeft: () => {},
|
|
onSwipedRight: () => {},
|
|
onSwipedTop: () => {},
|
|
onSwipedBottom: () => {},
|
|
}
|
|
|
|
export default Card;
|