import React from 'react' import { View } from 'react-native' import { OButton, OIcon, OText } from '../shared' import {NotFoundSourceParams} from '../../types' import { NotFound, NotFoundImage } from './styles' import { useTheme } from 'styled-components/native' export const NotFoundSource = (props: NotFoundSourceParams) => { const { image, content, btnTitle, conditioned, onClickButton, textSize } = props const theme = useTheme() const errorImage = image || theme.images.general.notFound return ( {errorImage && ( )} {content && conditioned && !errorImage && {content}} {content && !conditioned && {content}} {!onClickButton && props.children && ( props.children )} {onClickButton && ( onClickButton()} text={btnTitle} textStyle={{color: theme.colors.white}} /> )} ) }