// @flow import * as React from 'react'; import {Image} from "react-native"; import {List, withTheme} from 'react-native-paper'; import type {CustomTheme} from "../../../managers/ThemeManager"; import type {ServiceItem} from "../../../managers/ServicesManager"; type Props = { item: ServiceItem, isActive: boolean, height: number, onPress: () => void, theme: CustomTheme, } class DashboardEditItem extends React.Component { shouldComponentUpdate(nextProps: Props) { return (nextProps.isActive !== this.props.isActive); } render() { return ( } right={props => this.props.isActive ? : null} style={{ height: this.props.height, justifyContent: 'center', paddingLeft: 30, backgroundColor: this.props.isActive ? this.props.theme.colors.proxiwashFinishedColor : "transparent" }} /> ); } } export default withTheme(DashboardEditItem);