notification-panfilov v1.0.1
Description
React component that processes a form, its events and elements.
Installation
npm i --save form-panfilovTesting
For testing, a bunch of jest and the testing library is used. To run the tests, type the following command
npm testor command to restart the tests after they are changed
npm test:watchExample and development
In the rollup folder in the terminal, enter the following command to create a link to the local npm package.
npm linkIn the same folder, you need to create a link to react and react-dom.
Link to react
npm link ..\defaultReact\node_modules\reactLink to react-dom
npm link ..\defaultReact\node_modules\react-domAfter that, go to the defaultReact folder and run the project with the command
npm link startUsing
Key component of the notification. Wrappers for notification message.
<NotificationList><App/></NotificationList>Wrapper component for form fields
<FormWrapper errors={errors} form={defaultValue}>
fields form
<FormWrapper/>Hooks for create message.
const {addNotification, deleteNotification, notifications} = useNotificationaddNotification - function for create notification. deleteNotification - function for delete notification. notifications - list notifications.
NotificationInterface - interface notification.
constsNotification - consts for set type notification.
5 years ago