import React from 'react'
import Required from './required'

export default function Input(props: {
  label: string
  name?: string
  required: boolean
  children: React.ReactNode
}) {
  const { label, name, required, children } = props

  return (
    <>
      <div className="fsw">
        <div className="fs">
          <label className="flabel" htmlFor={name}>
            {label} {required && <Required />}
          </label>
          {children}
        </div>
      </div>
    </>
  )
}
