diff --git a/wax-prosemirror-components/src/components/tables/CreateTable.js b/wax-prosemirror-components/src/components/tables/CreateTable.js index 00951d71502abc7c014f04d419c893e388468c5e..d73814b07dcfbd6eebeb418cd696af998107b663 100644 --- a/wax-prosemirror-components/src/components/tables/CreateTable.js +++ b/wax-prosemirror-components/src/components/tables/CreateTable.js @@ -20,11 +20,11 @@ const ButtonStyled = styled.button` `; const InsertTableToolContainer = styled.div` + display: block !important; + height: auto; top: 53px; + left: 556px; position: absolute; - height: auto; - width: 167px; - display: block !important; `; const CreateTable = ({ view = {}, item }) => { diff --git a/wax-prosemirror-components/src/ui/tables/InsertTableTool.js b/wax-prosemirror-components/src/ui/tables/InsertTableTool.js index 1d29da5b3cfb101848554bb1355a6073f1ff4d53..f37ee9b5c9054c242c17b7f88fc961cae8146e6e 100644 --- a/wax-prosemirror-components/src/ui/tables/InsertTableTool.js +++ b/wax-prosemirror-components/src/ui/tables/InsertTableTool.js @@ -76,24 +76,22 @@ const GUTTER_SIZE = 5; const CELL_SIZE = 16; const MAX_SIZE = 20; -class GridCell extends React.PureComponent { - render() { - const { x, y, selected } = this.props; - const style = { - left: x + 'px', - top: y + 'px', - width: CELL_SIZE + 'px', - height: CELL_SIZE + 'px', - border: '1px solid gray', - boxSizing: 'border-box', - position: 'absolute', - zIndex: 2, - }; +const GridCell = props => { + const { x, y, selected } = props; + const style = { + left: x + 'px', + top: y + 'px', + width: CELL_SIZE + 'px', + height: CELL_SIZE + 'px', + border: '1px solid gray', + boxSizing: 'border-box', + position: 'absolute', + zIndex: 2, + }; - if (selected) style.background = 'skyblue'; - return <div style={style} />; - } -} + if (selected) style.background = 'skyblue'; + return <div style={style} />; +}; GridCell.propTypes = { x: PropTypes.number.isRequired,