react-text-range 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js
CHANGED
|
@@ -280,7 +280,7 @@ const SelectionHandler = ({ pos, grab, setGrab, left, bgColor, width }) => {
|
|
|
280
280
|
: React.createElement(SvgQuoteRight, null)));
|
|
281
281
|
};
|
|
282
282
|
|
|
283
|
-
const ReactTextRange = ({ initLeftPos, initRightPos, Container, children, onChange, props, selectionColor, handlerWidth, }) => {
|
|
283
|
+
const ReactTextRange = ({ initLeftPos, initRightPos, Container, children, onChange, props, selectionColor, handlerWidth, className, }) => {
|
|
284
284
|
const [mouseOnLeft, setMouseOnLeft] = React.useState(false);
|
|
285
285
|
const [mouseOnRight, setMouseOnRight] = React.useState(false);
|
|
286
286
|
const [textDiv, leftHandler, rightHandler, rects] = useTextSelectionEditor(initLeftPos, initRightPos, mouseOnLeft, mouseOnRight);
|
|
@@ -293,7 +293,7 @@ const ReactTextRange = ({ initLeftPos, initRightPos, Container, children, onChan
|
|
|
293
293
|
}
|
|
294
294
|
}, [leftHandler, rightHandler]);
|
|
295
295
|
const bgColor = selectionColor;
|
|
296
|
-
return (React.createElement("div", { draggable: false, style: Object.assign({ position: 'relative' }, props) },
|
|
296
|
+
return (React.createElement("div", { className: className, draggable: false, style: Object.assign({ position: 'relative' }, props) },
|
|
297
297
|
React.createElement(SelectionRects, { rects: rects, bgColor: bgColor }),
|
|
298
298
|
React.createElement(Container, { ref: textDiv }, children),
|
|
299
299
|
React.createElement(SelectionHandler, { bgColor: bgColor, width: handlerWidth, grab: mouseOnLeft, left: true, pos: leftHandler, setGrab: (v) => setMouseOnLeft(v) }),
|
package/dist/esm/index.js
CHANGED
|
@@ -260,7 +260,7 @@ const SelectionHandler = ({ pos, grab, setGrab, left, bgColor, width }) => {
|
|
|
260
260
|
: React__default.createElement(SvgQuoteRight, null)));
|
|
261
261
|
};
|
|
262
262
|
|
|
263
|
-
const ReactTextRange = ({ initLeftPos, initRightPos, Container, children, onChange, props, selectionColor, handlerWidth, }) => {
|
|
263
|
+
const ReactTextRange = ({ initLeftPos, initRightPos, Container, children, onChange, props, selectionColor, handlerWidth, className, }) => {
|
|
264
264
|
const [mouseOnLeft, setMouseOnLeft] = useState(false);
|
|
265
265
|
const [mouseOnRight, setMouseOnRight] = useState(false);
|
|
266
266
|
const [textDiv, leftHandler, rightHandler, rects] = useTextSelectionEditor(initLeftPos, initRightPos, mouseOnLeft, mouseOnRight);
|
|
@@ -273,7 +273,7 @@ const ReactTextRange = ({ initLeftPos, initRightPos, Container, children, onChan
|
|
|
273
273
|
}
|
|
274
274
|
}, [leftHandler, rightHandler]);
|
|
275
275
|
const bgColor = selectionColor;
|
|
276
|
-
return (React__default.createElement("div", { draggable: false, style: Object.assign({ position: 'relative' }, props) },
|
|
276
|
+
return (React__default.createElement("div", { className: className, draggable: false, style: Object.assign({ position: 'relative' }, props) },
|
|
277
277
|
React__default.createElement(SelectionRects, { rects: rects, bgColor: bgColor }),
|
|
278
278
|
React__default.createElement(Container, { ref: textDiv }, children),
|
|
279
279
|
React__default.createElement(SelectionHandler, { bgColor: bgColor, width: handlerWidth, grab: mouseOnLeft, left: true, pos: leftHandler, setGrab: (v) => setMouseOnLeft(v) }),
|
package/dist/index.d.ts
CHANGED