32 lines
657 B
JavaScript
32 lines
657 B
JavaScript
import React from 'react'
|
|
import PropTypes from 'prop-types'
|
|
import { StyleSheet, TouchableOpacity } from 'react-native'
|
|
|
|
import AppIcon from './app-icon'
|
|
|
|
import { Colors, Sizes } from '../../styles/redesign'
|
|
|
|
const CloseIcon = ({ onClose, ...props }) => {
|
|
return (
|
|
<TouchableOpacity
|
|
onPress={onClose}
|
|
style={styles.container}
|
|
{...props}
|
|
>
|
|
<AppIcon name='cross' color={Colors.orange} />
|
|
</TouchableOpacity>
|
|
)
|
|
}
|
|
|
|
CloseIcon.propTypes = {
|
|
onClose: PropTypes.func.isRequired
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
alignSelf: 'flex-start',
|
|
marginBottom: Sizes.base
|
|
}
|
|
})
|
|
|
|
export default CloseIcon |