import React from 'react' ; import { Cell } from 'design/DataTable' ; import { ButtonBorder } from 'design' ; import { displayDateTime } from 'shared/services/loc' ; import { Event } from 'teleport/services/audit' ; export const ActionCell = props => { const { rowIndex , onViewDetails , data } = props ; const event = data [ rowIndex ] ; function onClick ( ) { onViewDetails ( event ) ; } return ( < Cell align = "right" > < ButtonBorder size = "small" onClick = { onClick } width = "87px" > Details < /ButtonBorder> < /Cell>); } ; export const TimeCell = props => { const { rowIndex , data } = props ; const { time } = data [ rowIndex ] ; return < Cell style = { { minWidth : '120px' } } > { displayDateTime ( time ) } < /Cell>; } ; export function DescCell ( props ) { const { rowIndex , data } = props ; const { message } = data [ rowIndex ] ; return < Cell style = { { wordBreak : 'break-word' } } > { message } < /Cell>; }