react-numeric-input
Version:
Number input component that can replace the native number input which is not yet very well supported and where it is, it does not have the same appearance across the browsers. Additionally this component offers more flexible options and can be used for an
28 lines (22 loc) • 698 B
JSX
/* global $, hljs, NumericInput */
import React from "react"
import ReactDOM from "react-dom"
import Demo from "./Demo"
// import NumericInput from '../index.js';
$(function() {
$('script.jsx').each(function(i, s) {
var div = $('<div/>'),
props = Function('return (' + $(s).text() + ')')();
$(s).replaceWith(div);
var widget = ReactDOM.render(
React.createElement(NumericInput, props),
div[0]
);
div.data("widget", widget)
});
ReactDOM.render(<Demo/>, $('.demo')[0]);
hljs.configure({ useBR : false });
$('.code').each(function(i, block) {
hljs.highlightBlock(block);
});
});