4.13.0 • Published 4 years ago

@alexseitsinger/react-simple-input v4.13.0

Weekly downloads
-
License
BSD-2-Clause
Repository
github
Last release
4 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

4 years ago

4.13.0

4 years ago

4.11.3

4 years ago

4.11.2

4 years ago

4.11.1

4 years ago

4.10.1

4 years ago

4.8.0

5 years ago

4.5.0

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago