0.2.72 • Published 7 days ago

@onvo-ai/react v0.2.72

Weekly downloads
-
License
MIT
Repository
github
Last release
7 days ago

Onvo AI react library

This react package can be used to display the list of dashboards available to a user or single dashboard from Onvo AI. The components are also completely customizable.

Installation

You can install this demo UI library using npm:

npm install @onvo-ai/react

Usage

To use this demo UI library in your project, import the components you need from the library and use them in your React components.

import { Wrapper, DashboardList } from "@onvo-ai/react";
const baseUrl = "https://dashboard.onvo.ai";

const ListPage = () => {
  const [accessToken, setAccessToken] = useState("");
  const userId = "123456";

  useEffect(() => {
    fetch("/api/get-token/" + userId)
      .then((data) => data.json())
      .then((data) => {
        setAccessToken(data.token);
      });
  }, []);

  return (
    <Wrapper baseUrl={baseUrl} token={accessToken}>
      <DashboardList />
    </Wrapper>
  );
};

const DashboardPage = (id) => {
  const [accessToken, setAccessToken] = useState("");
  const userId = "123456";

  useEffect(() => {
    fetch("/api/get-token/" + userId)
      .then((data) => data.json())
      .then((data) => {
        setAccessToken(data.token);
      });
  }, []);

  return (
    <Wrapper baseUrl={baseUrl} token={accessToken}>
      <Dashboard id={id}>
        <DashboardHeader />
        <DashboardGrid />
      </Dashboard>
    </Wrapper>
  );
};

Contributing

You can fork the repository and make a pull request with your changes. Make sure to also update the docs with any relevant changes you have made.

Steps

  • Fork the repository.
  • Clone the repository to your local machine.
  • Install the dependencies using npm install.
  • View the components in the browser using npm run storybook.
  • Make your changes.
  • Test the changes using npm test.
  • Build the library using npm run build.
  • Commit the changes and push them to your forked repository.
  • Publish the package on npm.
  • Install and use the package in your project.
0.2.72

7 days ago

0.2.71

7 days ago

0.2.69

7 days ago

0.2.68

7 days ago

0.2.70

7 days ago

0.2.67

8 days ago

0.2.66

8 days ago

0.2.65

8 days ago

0.2.64

8 days ago

0.2.63

9 days ago

0.2.62

9 days ago

0.2.61

10 days ago

0.2.60

11 days ago

0.2.59

12 days ago

0.2.58

12 days ago

0.2.57

12 days ago

0.2.56

12 days ago

0.2.55

12 days ago

0.2.54

12 days ago

0.2.52

13 days ago

0.2.51

13 days ago

0.2.50

13 days ago

0.2.53

13 days ago

0.2.49

14 days ago

0.2.48

14 days ago

0.2.47

15 days ago

0.2.46

15 days ago

0.2.45

19 days ago

0.2.44

19 days ago

0.2.43

20 days ago

0.2.41

23 days ago

0.2.40

23 days ago

0.2.42

23 days ago

0.2.39

24 days ago

0.2.38

24 days ago

0.2.37

24 days ago

0.2.36

1 month ago

0.2.35

1 month ago

0.2.34

1 month ago

0.2.33

1 month ago

0.2.32

2 months ago

0.2.30

2 months ago

0.2.31

2 months ago

0.2.27

2 months ago

0.2.26

2 months ago

0.2.25

2 months ago

0.2.29

2 months ago

0.2.28

2 months ago

0.2.24

2 months ago

0.2.23

2 months ago

0.2.22

2 months ago

0.2.21

2 months ago

0.2.20

2 months ago

0.2.19

2 months ago

0.2.18

2 months ago

0.2.17

2 months ago

0.2.16

2 months ago

0.2.15

2 months ago

0.2.14

2 months ago

0.2.13

2 months ago

0.2.12

2 months ago

0.2.11

2 months ago

0.2.10

2 months ago

0.2.9

2 months ago

0.2.8

2 months ago

0.2.7

3 months ago

0.2.6

3 months ago

0.2.5

3 months ago

0.1.10

3 months ago

0.1.11

3 months ago

0.2.1

3 months ago

0.2.0

3 months ago

0.1.8

3 months ago

0.1.7

3 months ago

0.1.9

3 months ago

0.2.3

3 months ago

0.1.4

3 months ago

0.2.2

3 months ago

0.1.6

3 months ago

0.2.4

3 months ago

0.1.5

3 months ago

0.1.3

3 months ago

0.1.2

3 months ago

0.1.1

3 months ago

0.1.0

3 months ago