enfi
TypeScript icon, indicating that this package has built-in type declarations

0.9.9 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i enfi

Weekly Downloads

2

Version

0.9.9

License

MIT

Unpacked Size

127 kB

Total Files

19

Last publish

Collaborators

  • joshdreben