2.1.7 • Published 2 months ago

nebuia-react-component v2.1.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 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';
2.1.7

2 months ago

2.1.6

2 months ago

2.1.5

2 months ago

2.1.4

3 months ago

2.1.3

3 months ago

2.1.2

3 months ago

2.1.1

3 months ago

2.1.0

3 months ago

2.0.33

4 months ago

2.0.31

4 months ago

2.0.32

4 months ago

2.0.30

4 months ago

2.0.28

4 months ago

2.0.29

4 months ago

2.0.26

4 months ago

2.0.27

4 months ago

2.0.25

4 months ago

2.0.19

4 months ago

2.0.24

4 months ago

2.0.22

4 months ago

2.0.23

4 months ago

2.0.20

4 months ago

2.0.21

4 months ago

2.0.18

4 months ago

2.0.17

5 months ago

2.0.16

5 months ago

2.0.15

5 months ago

2.0.14

5 months ago

2.0.13

5 months ago

2.0.5

8 months ago

2.0.4

8 months ago

2.0.11

5 months ago

2.0.7

5 months ago

2.0.6

8 months ago

2.0.9

5 months ago

2.0.10

5 months ago

2.0.8

5 months ago

2.0.3

8 months ago

2.0.2

8 months ago

1.0.10

9 months ago

1.0.9

9 months ago

1.0.8

9 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

12 months ago

1.0.4

12 months ago