import React from 'react'; import { Icon } from '@geenee/ui/src/lib/component/icon/icon.component'; import { TableActionName } from '@geenee/ui/src/lib/component/styled-table'; import { ActionColumn, IconWrapper } from '@geenee/ui/src/lib/component/styled-table/styles'; type Props = { rowActions?: { id: TableActionName; onClick: (item: T) => void }[]; row: T; } export const RowActions = ({ rowActions, row }: Props) => (rowActions?.length ? ( { rowActions.map((action, actionIndex) => ( action.onClick(row) } > )) } ) : <>);