import { Theme } from '@ulangi/ulangi-common/enums' ; import { ActionItem } from '@ulangi/ulangi-common/interfaces' ; import { ObservableScreenLayout } from '@ulangi/ulangi-observable' ; import * as React from 'react' ; import { TouchableOpacity , View } from 'react-native' ; import { DefaultText } from '../common/DefaultText' ; import { LightBoxActionItemStyles , lightBoxActionItemResponsiveStyles , } from './LightBoxActionItem.style' ; export interface LightBoxActionItemProps { theme : Theme ; screenLayout : ObservableScreenLayout ; isLast : boolean ; item : ActionItem ; } export class LightBoxActionItem extends React . Component < LightBoxActionItemProps > { public get styles ( ) : LightBoxActionItemStyles { return lightBoxActionItemResponsiveStyles . compile ( this . props . screenLayout , this . props . theme ) ; } public render ( ) { return ( < View style = { [ this . styles . item_container , this . props . isLast ? this . styles . last_item_style : null , ] } > < TouchableOpacity testID = { this . props . item . testID } style = { this . styles . item_button } onPress = { this . props . item . onPress } > < DefaultText style = { [ this . styles . item_text , this . props . item . textColor ? { color : this . props . item . textColor } : null , ] } > { this . props . item . text } < /DefaultText> < /TouchableOpacity> < /View>); } }