UNPKG

@talend/react-components

Version:
33 lines (32 loc) 1.1 kB
import PropTypes from 'prop-types'; import { Component } from 'react'; import classNames from 'classnames'; import { Actions } from '../../Actions'; import largeTheme from './RowLargeCellActions.module.scss'; import tableTheme from './RowTableCellActions.module.scss'; import { jsx as _jsx } from "react/jsx-runtime"; const LIST_ACTION_CLASS_NAME = 'tc-list-actions'; /** * Cell that renders actions */ class CellActions extends Component { shouldComponentUpdate(nextProps) { return this.props.cellData !== nextProps.cellData; } render() { return /*#__PURE__*/_jsx("div", { className: classNames(LIST_ACTION_CLASS_NAME, tableTheme[LIST_ACTION_CLASS_NAME], largeTheme[LIST_ACTION_CLASS_NAME]), children: /*#__PURE__*/_jsx(Actions, { actions: this.props.cellData, hideLabel: true, link: true }) }); } } CellActions.displayName = 'VirtualizedList(CellActions)'; CellActions.propTypes = { cellData: PropTypes.arrayOf(PropTypes.shape(Actions.propTypes)) }; export default CellActions; //# sourceMappingURL=CellActions.component.js.map