@knovator/pagecreator-admin
v1.1.6
Published
<a name="readme-top"></a>
Downloads
557
Readme
About The Project
@knovator/pagecreator-admin
provides Widget
and Page
components to integrate in UI to builds view that manage widgets and page data.
Built With
- ReatJS
- Nx
- TailwindCSS
- react-hook-form
- react-transition-group
- react-beautiful-dnd
- react-dropzone
- react-select
- @knovator/api
Getting Started
@knovator/pagecreator-admin
is designed to be used in ReactJS/NextJS project.
Prerequisites
Create one reactjs/nextjs application if you don't have one,
- Project
npx create-react-app my-app # or npx create-next-app@latest
- API
- Keep your backend application ready according to the steps mentioned in @knovator/pagecreator-node
Installation
- Add pagecreator package
npm install @knovator/pagecreator-admin # or yarn add @knovator/pagecreator-admin
Usage
Provider
In order to support communication between components @knovator/pagecreator-admin
uses Context API. So, Widget
/Page
components should be wrapped by Provider.
import { Provider } from '@knovator/pagecreator-admin';
<Provider
...
>
...
</Provider>
Props
token
- JWT token to be sent along the requests
baseUrl
- Base API url, without forward slash at end i.e.
https://api.xyz.in
- Base API url, without forward slash at end i.e.
onError(callback_code, code, message) (optional)
- callback to execute on error
onSuccess(callback_code, code, message) (optional)
- callback to execute on success
onLogout (optional)
- callback to execute on API request with unauthorized code in body
switchClass
class
name to apply toToggle
component, default iskhb_switch
widgetRoutesPrefix
- Prefix to apply after
baseUrl
while callingwidget
API
- Prefix to apply after
itemsRoutesPrefix
- Prefix to apply after
baseUrl
while callingitems
API
- Prefix to apply after
pageRoutesPrefix
- Prefix to apply after
baseUrl
while callingpage
API
- Prefix to apply after
Widget
Page
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE.txt
for more information.
Contact
Knovator Technologies
- Twitter @knovator
- Web https://knovator.com/
Project Link: https://github.com/knovator/masters-admin