Sha256: 6b5ac86f8c818f23801d63c9d49593dbdfc88f6c28fabd49e1374c892dd5ef84
Contents?: true
Size: 1.05 KB
Versions: 5
Compression:
Stored size: 1.05 KB
Contents
import React from 'react' import PropTypes from "prop-types" import classnames from 'classnames' import {Caption} from "../" const propTypes = { className: PropTypes.string, name: PropTypes.string, label: PropTypes.string, placeholder: PropTypes.string, type: PropTypes.string, value: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]) } const defaultProps = { type: "text" } class Input extends React.Component { render() { const { className, name, label, placeholder, type, value } = this.props const css = classnames([ `pb_input_kit`, className, ]) return ( <div className="pb_input_kit"> <Caption text={label} /> <div className="input_wrapper"> <input className={css} name={name} placeholder={placeholder} type={type} value={value} /> </div> </div> ) } } Input.propTypes = propTypes Input.defaultProps = defaultProps export default Input
Version data entries
5 entries across 5 versions & 1 rubygems