npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

eargo-ui-components

v1.1.2

Published

Eargo UI Components

Downloads

5

Readme

eargo-components

npm version downloads dependencies devDependencies

Eargo UI Components

Run package locally

npm install
npm link

To use in the project

npm install eargo-components
npm link eargo_components
import { NavBar } from 'eargo-components'

To unlink package

npm unlink eargo_components

To use package from publish version

npm install eargo-components
import { NavBar, Footer } from 'eargo-components'

Publish Package

We need paid account for publishing private packages.

npm i
npm build
npm login 
npm publish

Example

NavBar:

<NavBar history={history} />
<Footer history={history} />

Use to pass Props

yotpoKey {string}

Yotpo key is required for applying reviews star rating in header floating cart

history {react-router-dom's history instance}

Pass react-router-dom's history instance, this is required for menu navigation

promoBanner {object} (Optional)

Pass promoBanner if you want to apply promobanner in your header

menus {menuArray} (Optional)

Example:-


const addressUrl = "https://web-staging3.eargo.com/" // will varry according to environments
const menuArray = [
	{
		title: 'Our Solutions',
		url: `${addressUrl}`,
		parentClass: 'li_solution', // Add class name if you want to add some style with this class
		childClass: 'nav_solution', // Add class name if you want to add some style with this class of child element
		subMenuList: [
			{
				title: 'Hearing Aids',
				suburl: `${addressUrl}products-hearing-aids`,
			}
		]
	},
	{
		title: 'Eargo Difference',
		url: `${addressUrl}`,
		parentClass: 'li_difference',
		childClass: 'nav_difference',
		subMenuList: [
			{
				title: 'How It Works',
				suburl: `${addressUrl}eargo-difference`,
			}
		]
	},
	{
		title: 'Shop',
		url: '/',
		parentClass: 'li_store',
		childClass: 'nav_store',
		subMenuList: [
			{
			  address: '/eargo-neo-hifi',
			  optionImage: 'IMAGE_URL',
			  optionTitle: 'Eargo Neo HiFi',
			},
			{
			  address: '/eargo-neo',
			  optionImage: 'IMAGE_URL',
			  optionTitle: 'Eargo Neo'
			},
			{
			  address: '/eargo-max',
			  optionImage: 'IMAGE_URL',
			  optionTitle: 'Eargo Max'
			},
			{
			  address: '/accessories',
			  optionImage: 'IMAGE_URL',
			  optionTitle: 'Accessories'
			}
		  ]
	},
	{
		title: 'Support',
		url: `${addressUrl}showme`,
		parentClass: 'li_support',
		childClass: 'nav_support'
	},
	{
		title: 'Insider',
		hoverTitle: 'Insider Blog', // If you want to show different value on anchor hover
		url: `${addressUrl}blog`,
		parentClass: 'li_blog',
		childClass: 'nav_blog'
	},
];

menuArray is the set of menus, that you want to show in header. If you want to pass your menu array then create something like this.

Use to pass Props (For Shop domain)

cartCount {number}

Pass cartCount value if you want to show total of products in the cart

selectedVariant {object}

This object will hold the value of selected variant that will be reflected in floating cart

handleCartState {func}

Function that will update the state of cart

isCartOpen {bool}

isCartOpen will contain the value for current state of cartStates

handleReviews {func}

handleReviews function will scroll the page where productReviews started

Footer:

history {react-router-dom's history instance}

Pass react-router-dom's history instance, this is required for navigation

socialHandlers {object}

Social handlers object is optional, if user will not pass this prop, in that situation we're showing default handlers.

menus {menuArray} (Optional)

User will pass menuArray, if we want to show menu in footer

copyrightLinks {array} (Optional)

Pass array of copyright menus, this is optional