Skip to content

Instantly share code, notes, and snippets.

@sdebaun
Created March 22, 2016 04:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save sdebaun/d93d6575e00376c31be7 to your computer and use it in GitHub Desktop.
const NameInput = makeInputControl({
label: 'Enter your name',
className: 'name',
})
const EmailInput = makeInputControl({
label: 'Enter your email',
className: 'email',
})
const MyFormControl = sources => {
const nameInput = NameInput(sources)
const emailInput = EmailInput(sources)
}
const MyFormControl = sources => {
const nameInput = InputControl({
...sources,
label: 'Enter your name',
className: 'name',
})
const emailInput = InputControl({
...sources,
label: 'Enter your email',
className: 'email',
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment