mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 11:57:33 +08:00
* Add typings for cleave.js Add typings for cleave.js and <Cleave> react component. * Fix lint errors * fixup! Fix lint errors * fixup! Fix lint errors
18 lines
386 B
TypeScript
18 lines
386 B
TypeScript
import * as React from "react";
|
|
import Cleave = require("cleave.js");
|
|
import CleaveReact = require("cleave.js/react");
|
|
|
|
const Example1 = () => {
|
|
Cleave("#my-input", { phone: true });
|
|
};
|
|
|
|
const ExampleReact1 = (props: any) => {
|
|
return (
|
|
<CleaveReact
|
|
value="test"
|
|
className="form-control"
|
|
options={{ phone: true }}
|
|
/>
|
|
);
|
|
};
|