1.2.0 • Published 4 years ago

customizable-input-package v1.2.0

Weekly downloads
-
License
-
Repository
-
Last release
4 years ago

This project requires Bootstrap 4.6 imported in your ./public/index.html

PROPS:

  • *state - the state that will be updated with the input's content
  • *updateState - the state's that will be updated with the input's content update function
  • *label - the name of the input (displayed with capital case and used in the state)
  • *errors - the state that contains the errors (should be an object with the label as a prop)
  • option - settings

OPTIONS (passed as prop):

Global
  • inputInitialBorderColor - default: white
  • col - default: not enabled
  • fontSize - default: 1.2em
Input:
  • inputInitialBorderColor - default: white
  • inputInitialColor - default: white
  • inputBackground - default: none
  • inputAnimateColor - default: #FF9513
  • inputAnimateBorderColor - default: #FF9513
Label:
  • labelInitialColor - default: white
  • labelAnimateColor - default: #FF9513
  • labelCenter - default: false
function App() {
  const [input, setInput] = useState({ email: '' });
  const [errors, setErrors] = useState({ email: '' });

  return (
    <div className="container align-items-center justify-content-center p-5" style={{ background: '#243E70' }}>
      <Input state={input} updateState={setInput} label={'email'} errors={errors} options={{ labelInitialColor: 'blue' }}/>
    </div>
  );
}

export default App;
1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.6.3

4 years ago

0.6.2

4 years ago

0.5.0

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago