@convertkit/selection-toolbar
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -1001,4 +1001,8 @@ import React, { Component } from 'react'; | ||
get: function get() { | ||
if (!this.__target || !this.__element) return 0; | ||
switch (this.__options.alignY) { | ||
case "top": | ||
return this.__target.getBoundingClientRect().top - this.__element.offsetParent.getBoundingClientRect().top - this.__element.offsetHeight; | ||
case "middle": | ||
@@ -1060,4 +1064,26 @@ case "right": | ||
return Position; | ||
}(); | ||
}(); // class PositionElement extends Component { | ||
// constructor(props) { | ||
// super(props); | ||
// this.state = { | ||
// position: new Position(target, element, props) | ||
// }; | ||
// } | ||
// | ||
// componentDidUpdate() { | ||
// if (!this.props.lock && ) { | ||
// const { target, element, ...props } = this.props; | ||
// const position = new Position(target, element, props); | ||
// | ||
// } | ||
// this.setState({}); | ||
// } | ||
// | ||
// render() { | ||
// const { children, target, element, ...props } = this.props; | ||
// return children(new Position(target, element, props)); | ||
// } | ||
// } | ||
var PositionElement = function PositionElement(_ref) { | ||
@@ -1069,4 +1095,2 @@ var children = _ref.children, | ||
console.log("target", target); | ||
console.log("element", element); | ||
return children(new Position(target, element, props)); | ||
@@ -1073,0 +1097,0 @@ }; |
{ | ||
"name": "@convertkit/selection-toolbar", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "A toolbar for the ConvertKit Editor that hovers over the selection.", | ||
@@ -32,3 +32,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "02de975b0e1b6e4fd856ce77e4e8f54f46fddb1c" | ||
"gitHead": "b2354156dac97de7b24495da9984af0210939881" | ||
} |
import React from "react"; | ||
import ClickOutside from "./click-outside"; | ||
import ClickOutside from "../../../shared/components/click-outside"; | ||
@@ -4,0 +4,0 @@ const ToolbarMenu = ({ closeMenu, closeToolbar, editor, component: Menu }) => { |
58435
1680