
Usage
npm install @carforyou/header-footer
In your postcss config, add the components paths to the purgecss paths, so this packages classnames don't get stripped:
const { getComponentPaths } = require("@carforyou/header-footer").default
Make sure to import global styles:
@import '@carforyou/components/assets/index.css';
Then, use components as follows
import { UserHeader } from "@carforyou/header-footer"
<UserHeader
language="de"
dealerhubRootUrl="https://dealerhub.carforyou.ch"
listingsRootUrl="https://www.carforyou.ch"
/>
Features
Header-Footer package supports enabling/disabling features via an optional features
prop. To enable specific feature pass { <featureName>: true }
e.g to disable the list for free CTA:
<UserHeader
language="de"
dealerhubRootUrl="https://dealerhub.carforyou.ch"
listingsRootUrl="https://www.carforyou.ch"
features={{
disabledCTA: true
}}
/>
Existing features
disabledCTA | UserHeader | disables List for free header CTA |
disabledMyGarage | DealerHeader | disables My Garage navigation bar |
Development
npm run build
Whenever you change the json translation files, run
npm run build:translations
You can link your local npm package to integrate it with any local project:
npm run link -- <relative_path_to_project>
Release a new version
New versions are released on the ci using semantic-release as soon as you merge into master. Please
make sure your merge commit message adheres to the corresponding conventions.
Circle CI
You will need to enable the repository in circle CI ui to be able to build it.
For slack notifications to work you will need to provide the token in circle settings.