{
render() {
const {
id,
rowWidth,
rowHeight,
updateDimensions,
node: { inline, resizable, hasInlineNeighbour, focused },
} = this.props;
return (
{resizable && this.props.isResizeMode ? (
) : (
)}
);
}
}
const mapStateToProps = createStructuredSelector({
isPreviewMode,
isEditMode,
isResizeMode,
// required by sub-components
isInsertMode,
isLayoutMode,
config: editableConfig,
node: purifiedNode,
rawNode: (state: RootState, props: NodeProps) => () => node(state, props),
});
const mapDispatchToProps = (
dispatch: Dispatch,
{ id }: { id: string }
) =>
bindActionCreators(
{
resizeCell: resizeCell(id),
focusCell: focusCell(id),
blurAllCells,
},
// tslint:disable-next-line:no-any
dispatch as any
);
export default connect(
mapStateToProps,
mapDispatchToProps
)(Cell);