1.0.7 • Published 10 months ago

afex-utils v1.0.7

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

AFEX Utilities

AFEX Utilities is a lightweight utility library designed to simplify the implementation of common components in our application.

Exports

The library exports a CookieBanner component that helps you manage cookie consent for your users, utilizing configuration options inspired by vanilla-cookieconsent.

Installation

To install AFEX Utilities, run the following command:

npm i afex-utils

Usage

Importing the Component

You can import the CookieBanner component from afex-utils into your main application file, such as App.tsx or main.tsx.

import React from 'react';
import { CookieBanner } from 'afex-utils';

{/* Example Configuration */}
const configuration= {
   categories: {
        necessary: {
            enabled: true,  // this category is enabled by default
            readOnly: true  // this category cannot be disabled
        },
        analytics: {}
    },
   language: {
        default: 'en',
        rtl: 'ar',
        autoDetect: 'browser',
        translations: {
            en: '/assets/translations/en.json',
            ar: '/assets/translations/ar.json'
        }
    }
}

function App() {
  return (
    <div>
      <CookieBanner configuration={configuration} />
      {/* Other components in your app */}
    </div>
  );
}

export default App;

Contributing

If you'd like to contribute to AFEX Utilities, please fork the repository and submit a pull request. We welcome all contributions!

License

AFEX Utilities is released under the MIT License.

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.0

10 months ago