Socket
Socket
Sign inDemoInstall

@arc-core-components/feature_global-amp-nav

Package Overview
Dependencies
8
Maintainers
12
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @arc-core-components/feature_global-amp-nav

Core component for the amp-sidebar in a Fusion implementation.


Version published
Weekly downloads
61
increased by1.67%
Maintainers
12
Install size
248 kB
Created
Weekly downloads
 

Readme

Source

Feature: Amp Nav

What does this do?

When used in a Fusion Project, this Core Component can be used to render a navigation bar that is compliant with amp, using the amp-sidebar component.

The Story Card requires the following information as props:

  • data
    • Array of sites -- the children returned from the Site Service content source.
  • elementClasses
    • Object of classes you can pass through to your markup.
  • sidebarConfig
    • Determines what side of the page your sidebar will render from, and allows you to pass classes to it.
  • logoConfig
    • Allows you to pass in a logo element, and allows it to go to the right or left side.
  • closeButtonConfig
    • Allows you to pass in a custom icon, along with classes.
  • openButtonConfig
    • Allows you to pass in a custom icon, along with classes

How do I use it?

  import AMPNav from '@arc-core-components/feature_global-amp-nav'

  <AMPNav {..yourProps}></AMPNav>

Take a look in the src file to see a suggested implementation, in index.mdx

How can I view what's in there quickly?

Run npm i && npm run docz:dev after cloning to see what is within.

Amp Notes:

Read the amp-sidebar documentation

Testing & Linting

We are using Jest and XO for testing and linting.

We are using Husky to run a pre-push hook, preventing un-linted or code that fails tests from making it into the repo.

To test: npm test

To lint: npm run lint - This will also fix any simple linter errors automatically.

To push without testing or linting: git push --no-verify - This can often be helpful if you just need to push a branch for demonstration purposes or for help.

FAQs

Last updated on 08 Nov 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc