2018-05-18 16:41:47 +00:00
|
|
|
import React from 'react';
|
2018-08-31 16:46:33 +00:00
|
|
|
import { Image, StyleSheet } from 'react-native';
|
2018-05-18 16:41:47 +00:00
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
2018-08-31 16:46:33 +00:00
|
|
|
style: {
|
|
|
|
marginRight: 7,
|
2018-05-18 16:41:47 +00:00
|
|
|
marginTop: 3
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2018-08-31 16:46:33 +00:00
|
|
|
const RoomTypeIcon = ({ type, size, style }) => {
|
2018-05-24 20:17:45 +00:00
|
|
|
if (!type) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2018-08-31 16:46:33 +00:00
|
|
|
if (type === 'c') {
|
|
|
|
return <Image source={{ uri: 'subscription_hashtag' }} style={[styles.style, style, { width: size, height: size }]} />;
|
|
|
|
}
|
|
|
|
return <Image source={{ uri: 'subscription_lock' }} style={[styles.style, style, { width: size, height: size }]} />;
|
2018-05-18 16:41:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
RoomTypeIcon.propTypes = {
|
2018-05-24 20:17:45 +00:00
|
|
|
type: PropTypes.string,
|
2018-08-31 16:46:33 +00:00
|
|
|
size: PropTypes.number,
|
|
|
|
style: PropTypes.object
|
2018-05-18 16:41:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
RoomTypeIcon.defaultProps = {
|
2018-08-31 16:46:33 +00:00
|
|
|
size: 10
|
2018-05-18 16:41:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default RoomTypeIcon;
|