enfi
v0.9.9
Published
lightweight typescript/javascript CMS for your REST API backend
Downloads
3
Readme
Enfi
Enfi is a lightweight and modular React component library CMS for your backend RESTful services
Enfi is also VERY MUCH UNDER DEVELOPMENT AND IS NO WHERE NEAR COMPLETE :)
Install
npm install --save enfi
Usage
Admin account login and registering
Use the
<Admin />
component to utilize Enfi's custom Admin account login and register pages with your own backend APIs
Example Code
import React, { Component } from 'react';
import { Admin } from 'enfi';
import 'enfi/dist/index.css';
// Use this as a callback function for when
// an admin successfully logs in or registers
const onSuccess = (res: any) {
console.log(res);
};
// Set these to be your own custom RESTful APIs
const loginAPI = "https://admin.api/that/handles/logging/in";
const registerAPI = "https://admin.api/that/handles/registering";
// Admin account login and register pages
const AdminAccount = () => {
return (
<Admin
onSuccess={onSuccess}
loginAPI={loginAPI}
registerAPI={registerAPI}
/>
);
};
export default AdminAccount;
License
MIT © JoshDreben