3.2.3 • Published 4 years ago

@alexseitsinger/react-simple-form v3.2.3

Weekly downloads
-
License
BSD-2-Clause
Repository
github
Last release
4 years ago

SimpleForm

A simple form for simple inputs.

Installation

yarn add @alexseitsinger/react-simple-form

Example

function App(props){
  return (
    <SimpleForm
      isFormSubmitted={props.isFormSubmitted}
      setFormSubmitted={props.setFormSubmitted}
      onFormSubmitted={props.onFormSubmitted}
      onFormCompleted={props.onFormCompleted}>
      <SimpleInput 
        resetValue={""}
        inputType={"text"}
        inputName={"name"}
        inputPlaceholder={"Name..."}
        minLength={8}
        maxLength={24}
        onSanitize={value => {
          // Do some cleaning...
          return value
        }}
        onDidSanitize={(oldValue, newValue) => {
          // Do something each time there's a cleaning...
        }}
        isInputEmpty={props.isNameFieldEmpty}
        setInputEmpty={props.setNameFieldEmpty}
        inputValue={props.nameFieldValue}
        setInputValue={props.setNameFieldValue}
        isValueValid={props.isNameFieldValueValid}
        setValueValid={props.setNameFieldValueValid}
        errorMessage={props.nameFieldErrorMessage}
        setErrorMessage={props.setNameFieldErrorMessage}
        errorStyle={{
          //...
        }}
        errorPosition={"centerLeft"}
      />
    </SimpleForm>
  )
}
3.2.2

4 years ago

3.2.3

4 years ago

3.0.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.1.0

4 years ago