1.3.12 • Published 6 months ago

@puravidaprime/ecommerce-components v1.3.12

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

@puravidaprime/ecommerce-components

npm

This project provides a collection of static components that can be easily integrated into any application.

Available Components

  • CookiesBanner: Displays a banner to inform users about the use of cookies on the website.

    • Properties:
      • cookieName: string (Default: 'lgpd') - Name of the cookie to check for acceptance.
      • cookieValue: boolean (Default: true) - Value of the cookie to be set when the user accepts.
  • ProteinCalculator: Displays a banner to inform users about the use of cookies on the website.

    • Properties:
      • email: string (Default: 'lgpd') - Name of the cookie to check for acceptance.
      • api: boolean (Default: true) - Value of the cookie to be set when the user accepts.

Installation

You can install the package via yarn or npm:

yarn add @puravidaprime/ecommerce-components

or

    npm i @puravidaprime/ecommerce-components

Classic Usage

Alternatively, you can include the library in your HTML file using UNPKG:

<!-- If you are using Classic methods, you have to load React and ReactDOM -->
<script src="https://unpkg.com/react@18/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>

<script defer src="https://unpkg.com/@puravidaprime/ecommerce-components@{CURRENT-VERSION}/lib/@puravidaprime/ecommerce-components.js" />

This module exports by default this variable: puravidalabs

you can extract from puravidalabs like this example:

<div id="cookies-banner-react"></div>

<script>
  document.addEventListener("DOMContentLoaded", function () {
   const CookiesBanner = puravidalabs.CookiesBanner;

    const container = document.getElementById('cookies-banner-react');

    const root = ReactDOM.createRoot(container);

    root.render(React.createElement(CookiesBanner, { cookieName: 'lgpd', cookieValue: true }));    
  });
</script>

Modern Usage

After installing the package, you can import the components into your project:

import { CookiesBanner } from '@puravidaprime/ecommerce-components';

export const App = () => {
    return <CookiesBanner cookieName="lgpd" cookieValue={true} />
}

Now, you can use the imported components in your application.

Feel free to explore the documentation of each component for more details on usage and available properties.

We hope these components make it easier to develop your application and enhance the user experience! Happy coding!

1.3.12

6 months ago

1.3.11

6 months ago

1.3.10

6 months ago

1.3.8

6 months ago

1.3.7

8 months ago

1.3.6

9 months ago

1.3.5

9 months ago

1.3.4

9 months ago

1.3.3

9 months ago

1.3.2

9 months ago

1.3.1

9 months ago

1.3.0

9 months ago

1.2.9

9 months ago

1.2.8

9 months ago

1.2.7

9 months ago

1.2.6

9 months ago

1.2.5

9 months ago

1.2.4

9 months ago

1.2.3

9 months ago

1.2.2

9 months ago

1.2.1

9 months ago

1.2.0

9 months ago

1.1.9

9 months ago

1.1.8

9 months ago

1.1.7

9 months ago

1.1.6

9 months ago

1.1.5

9 months ago

1.1.4

9 months ago

1.1.3

9 months ago

1.1.2

9 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.0.9

9 months ago

1.0.8

9 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago