Skip to main content

Getting Started

NPM JavaScript Style Guide

reworth-directory is a ready-to-use react component that let's you integrate REWORTH's directory

Install

# using yarn
yarn add @reworthrewards/directory-react-component

# using npm
npm install --save @reworthrewards/directory-react-component

Usage

import React from 'react';

import { ReworthDirectory } from '@reworthrewards/directory-react-component';

const Directory = () => {
return (
<ReworthDirectory
accentColor={'#2E58FF'}
lang={'ES'}
fontFamily={'Poppins'}
/>
)
}

Notice if you're using React with Typescript

import React from 'react';

const Reworth = require('@reworthrewards/directory-react-component');
const { ReworthDirectory } = Reworth;

const Directory = () => {
return (
<ReworthDirectory
accentColor={'#2E58FF'}
lang={'ES'}
fontFamily={'Poppins'}
/>
)
}

Allowed props

NameTypeDefaultOptionsDescription
accentColorString"#2E58FF"any desired colorAccent color for all elements and header
langString"ES""ES", "EN"Language supported by the component
fontFamilyString"Poppins""Poppins", "Montserrat", "Nunito"Available font families
geoStringundefined"19.3918512,-99.162209"Latitude and Longitude
gtmBooleanfalsetrue - falseActivate Google Tag Manager

License

mit © ReworthRewards