demo-lenguaje-2
Version:
A React component that sums two number.
33 lines (26 loc) • 973 B
JavaScript
import withTranslation from "./utils/language/withTranslation";
import mainT from "./utils/main";
import PropTypes from "prop-types";
import "./styles/demo.css";
// If you want to use the feature of translate multi-languages, you should import 'withTranslation'
// Input required:
// props:{
// language:String
// languageURL:String
// },
// (function)=>{your logic}
// If you want to run this component in mode local
// run command: yarn start:dev (this mode working with dev-test/App.js)
// If you want to create your own unit test
// in Input required, send props.languageURL="" and
// it will take resource local in directory dev-test/locales
const Demo = props => {
return withTranslation(props, mainT);
};
Demo.propTypes = {
inputA: PropTypes.number.isRequired,
inputB: PropTypes.number.isRequired,
language: PropTypes.oneOf(["en-US", "es-ES"]),
languageURL: PropTypes.string.isRequired
};
export default Demo;