@lskjs/form-control-input
v2.8.0
Published
Input control for Form
Downloads
48
Maintainers
Keywords
Readme
LSK.js – form-control-input
@lskjs/form-control-input – Input control for Form
Table of contents
⌨️ Install
# yarn
yarn i @lskjs/form-control-input prop-types react
# npm
npm i @lskjs/form-control-input prop-types react
Input example:
import React from 'react';
import { Form, Field } from 'formik';
import Story from '@lskjs/dev/Story';
import createForm from '../../createForm';
import FormSubmit from '../../FormSubmit';
import Input from './Input';
const InputFormView = props => (
<Form>
<Field {...props.control('input')} />
<FormSubmit {...props} />
</Form>
);
const InputForm = createForm({
view: InputFormView,
controls: {
input: {
title: 'Input',
component: Input,
required: true,
},
},
});
<Story>
<InputForm />
</Story>
📖 License
This project is licensed under the MIT License - see the LICENSE file for details
👥 Contributors
👏 Contributing
- Fork it (https://github.com/yourname/yourproject/fork)
- Create your feature branch (
git checkout -b features/fooBar
) - Commit your changes (
git commit -am 'feat(image): Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request