Repository URL to install this package:
|
Version:
3.0.10 ▾
|
import React from 'react'
export interface FormElementProps extends React.ClassAttributes<any> {
setRef?: Function
className?: string
formId?: string
handleSubmit?: Function
[key: string]: any
}
/**
* @todo @name innerRef > setRef
*/
export function FormElement<Props extends FormElementProps = FormElementProps>(
props: Props
) {
const { setRef, className, formId, handleSubmit, ...remainingProps } = props
return (
<form
ref={setRef}
{...remainingProps}
id={formId}
onSubmit={handleSubmit}
className={className}
/>
)
}
/**
* @todo - <Button> attom !!!!!!!!
*/
export const SubmitButton = props => <button {...props} />
export const CancelButton = props => <button {...props} />