import React from 'react' ; import { EuiTableRow , EuiTableRowCell } from '@elastic/eui' ; import { User } from '../../../types' ; interface UserRowProps { user : User ; showEmail ? : boolean ; } export const UserRow = ( { user : { name , email } , showEmail } ) => ( < EuiTableRow > < EuiTableRowCell > { name } < /EuiTableRowCell> < EuiTableRowCell > { showEmail && < span > { email } < /span>}</EuiTableRowCell > < /EuiTableRow>);