1616 */
1717
1818import AutoNumeric , { CallbackOptions } from "autonumeric" ;
19- import { ReactHTML , createElement , useEffect , useRef } from "react" ;
19+ import { createElement , useEffect , useRef } from "react" ;
2020
2121/** The base React component integrated with {@link !AutoNumeric}.
2222 *
2323 * This component is used as a base to construct higher-level React component that integrates with
24- * AutoNumeric. See {@link AutoNumericInput} for a live example.
24+ * AutoNumeric. See {@link AutoNumericInput} for a live example. For some elements, you would also
25+ * need to set the
26+ * [`contenteditable`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable)
27+ * attribute to true.
2528 *
2629 * @param options - Options of the component.
2730 * @param options.element - The element of the component, such as `"input"`.
@@ -32,6 +35,9 @@ import { ReactHTML, createElement, useEffect, useRef } from "react";
3235 * AutoNumeric!Options}.
3336 * @param options.state - The React state that controls and is controlled by {@link !AutoNumeric}.
3437 * If absent, this component will not interact with its parent via React states.
38+ *
39+ * @see [AutoNumeric: On which elements can it be
40+ * used?](https://docs.autonumeric.org/Documentation/on%20which%20elements%20can%20it%20be%20used/)
3541 */
3642export default function AutoNumericComponent ( {
3743 element,
@@ -40,7 +46,7 @@ export default function AutoNumericComponent({
4046 autoNumericOptions,
4147 state,
4248} : {
43- element : keyof ReactHTML ;
49+ element : string ;
4450 refKey : string ;
4551 props ?: Parameters < typeof createElement > [ 1 ] ;
4652 autoNumericOptions ?: CallbackOptions ;
0 commit comments