Created
January 28, 2016 19:44
-
-
Save schneidmaster/e79ee4fbbbdf6bc2cac4 to your computer and use it in GitHub Desktop.
react-bootstrap + react-maskedinput
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import classNames from 'classnames'; | |
import { Input } from 'react-bootstrap'; | |
import MaskedInputField from 'react-maskedinput'; | |
export default class MaskedInput extends Input { | |
renderInput() { | |
const className = this.isCheckboxOrRadio() || this.isFile() ? '' : 'form-control'; | |
return <MaskedInputField {...this.props} className={classNames(this.props.className, className)} ref="input" key="input" />; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment