2.6.0 • Published 3 months ago

nebuia-react-component v2.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Nebuia react component

This is a library to integrate Nebuia into your react app.

Installation

npm install nebuia-react-component

Requirements

To use this library you need to have a Nebuia account and a valid API key. You can get this information in the Nebuia dashboard. https://admin.nebuia.com

Usage

import { NebuiaStepsList } from 'nebuia-react-component';

<NebuiaStepsList
  enableBackground // Use own background, if false its background is transparent
  withDetailsPage // Shows a final page with the report summary
  lang="es" // Optional: Language of the component, default is "es", supported languages are "es" and "en"
  kyc={REPORT} // Optional: Initialize the component with a report, if not provided it will create a new report
  email={EMAIL} // Optional: Initialize the component with an email, if not provided it will ask the user for it
  phone={PHONE} // Optional: Initialize the component with a phone, if not provided it will ask the user for it
  onFinish={async (report) => {
    // When the user finishes the process, this function is called with the report
  }}
  getKeys={() => {
    // Returns the API keys, or a promise that resolves to the API keys
    return {
      apiKey: 'API_KEY',
      apiSecret: 'API_SECRET',
    };
  }}
/>;

Styles

Global styles

If your aop use another style system other than tailwind, you should import the global styles.

import 'nebuia-react-component/dist/esm/index.css';

Tailwindcss

If your app use tailwind, you can import the tailwind config extending the default styles.

In your tailwind.config.js file add the following:

import { NEBUIA_TAILWIND_CONFIG } from 'nebuia-react-component/dist/tailwind'; // <- Add this line

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    "....." // <- Your content
    "./node_modules/nebuia-react-component/dist/**/*.{js,ts,jsx,tsx}" // <- Add this line
  ],
  theme: {
    ...NEBUIA_TAILWIND_CONFIG // <- Add this line
  }
};

Also the tailwind form plugin is required, you can install it with:

npm install @tailwindcss/forms

And add it to your tailwind.config.js file:

module.exports = {
  plugins: [require('@tailwindcss/forms')],
};

In your index.css file add the following import at the top:

@import 'nebuia-react-component/dist/base.css';
3.0.0-alpha.1

3 months ago

2.4.0

4 months ago

2.6.0

4 months ago

2.5.0

4 months ago

2.3.2

6 months ago

2.2.0

10 months ago

2.3.0

8 months ago

2.3.1

8 months ago

2.1.9

1 year ago

2.1.10

11 months ago

2.1.8

1 year ago

2.1.7

1 year ago

2.1.6

1 year ago

2.1.5

1 year ago

2.1.4

1 year ago

2.1.3

1 year ago

2.1.2

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.33

1 year ago

2.0.31

1 year ago

2.0.32

1 year ago

2.0.30

1 year ago

2.0.28

1 year ago

2.0.29

1 year ago

2.0.26

1 year ago

2.0.27

1 year ago

2.0.25

1 year ago

2.0.19

1 year ago

2.0.24

1 year ago

2.0.22

1 year ago

2.0.23

1 year ago

2.0.20

1 year ago

2.0.21

1 year ago

2.0.18

1 year ago

2.0.17

1 year ago

2.0.16

2 years ago

2.0.15

2 years ago

2.0.14

2 years ago

2.0.13

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.11

2 years ago

2.0.7

2 years ago

2.0.6

2 years ago

2.0.9

2 years ago

2.0.10

2 years ago

2.0.8

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago