@ecreeth/rn-ui
Version:
Highly customizable and theming components for React Native
28 lines (23 loc) • 536 B
JavaScript
import React, { PureComponent } from 'react';
import { Image as RNImage } from 'react-native';
import PropTypes from 'prop-types';
const propTypes = {
...RNImage.propTypes,
size: PropTypes.oneOf(['mini', 'small', 'medium', 'large', 'big']),
};
const defaultProps = {
...RNImage.defaultProps,
size: 'medium',
};
class Avatar extends PureComponent {
render() {
return (
<RNImage
{...this.props}
/>
);
}
}
Avatar.propTypes = propTypes;
Avatar.defaultProps = defaultProps;
export default Avatar;