4.13.0 • Published 6 years ago

@alexseitsinger/react-simple-input v4.13.0

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

SimpleInput

A simple input for a simple form.

Installation

yarn add @alexseitsinger/react-simple-input

Example

function App(props) {
  return (
    <SimpleForm
      onFormSubmitted={props.onFormSubmitted}
      isFormSubmitted={props.isFormSubmitted}
      setFormSubmitted={props.setFormSubmitted}
      onFormCompleted={props.onFormCompleted}>
      <SimpleInput
        inputName={"name"}
        inputType={"text"}
        inputPlaceholder={"Name..."}
        inputValue={props.nameFieldValue}
        setInputValue={props.setNameFieldValue}
        isInputEmpty={props.isNameFieldEmpty}
        setInputEmpty={props.setNameFieldEmpty}
        isInputValueValid={props.isNameFieldValueValid}
        setInputValueValid={props.setNameFieldValueValid}
        minLength={8}
        maxLength={24}
        onSanitize={value => {
          // Return the cleaned data.
          return value
        }}
        onDidSanitize={(oldValue, newValue) => {
          /// .. do something with the field data.
        }}
        isFormSubmitted={props.isFormSubmitted}
        setFormSubmitted={props.setFormSubmitted}
        errorMessage={props.nameFieldErrorMessage}
        setErrorMessage={props.setNameFieldErrorMessage}
        errorPosition={"centerLeft"}
        errorStyle={{width: "100%", height: "100%"}}
        inputStyle={{backgroundColor: "#FFFFFF", padding: "0.333em"}}
      />
    </Form>
  )
}
4.12.0

6 years ago

4.13.0

6 years ago

4.11.3

6 years ago

4.11.2

6 years ago

4.11.1

6 years ago

4.10.1

6 years ago

4.8.0

6 years ago

4.5.0

6 years ago

1.2.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago