index.js 372 Bytes
Newer Older
zhanghaozhe committed
1 2 3
import React from "react"
import "./input.scss"
import classnames from "classnames"
zhanghaozhe committed
4

zhanghaozhe committed
5 6 7 8 9 10 11 12
function Input({ icon, wrapperClass, children, value, name, ...rest }) {
  return (
    <div className={classnames("input-wrapper", wrapperClass)}>
      <input className="input" name={name} value={value} {...rest} />
      {icon}
      {children}
    </div>
  )
zhanghaozhe committed
13 14
}

zhanghaozhe committed
15
export default Input