@oyeharry/app-menu

3.0.0-pre.2 • Public • Published

Build Status

<app-menu>

A simple side menu for App

##<app-menu>

Usage

Installation

npm install --save app-menu

In an html file

<html>
  <head>
    <script type="module">
      import '@oyeharry/app-menu/app-menu.js';
    </script>
  </head>
  <app-menu selected="0">
    <a href="#" class="app-menu-item">Item 1</a>
    <a href="#" class="app-menu-item">Item 2</a>
    <a href="#" class="app-menu-item">Item 3</a>
  </app-menu>
</html>

In a Polymer 3 element

import { PolymerElement, html } from '@polymer/polymer';
import '@oyeharry/app-menu/app-menu.js';

class SampleMenuElement extends PolymerElement {
  static get template() {
    return html`
      <style is="custom-style">
        app-menu {
          --app-menu-color: #616161;
          --primary-color: #f62a5a;
          --app-menu-selected-bg-color: rgba(0, 0, 0, 0.05);
        }
      </style>

      <app-menu selected="0">
        <a href="#" class="app-menu-item">Item 1</a>
        <a href="#" class="app-menu-item">Item 2</a>
        <a href="#" class="app-menu-item">Item 3</a>
      </app-menu>
    `;
  }
}
customElements.define('sample-element', SampleMenuElement);

Installation

git clone https://github.com/app-menu
cd app-menu
npm install
npm install -g polymer-cli

Running the demo locally

polymer serve --npm
open http://127.0.0.1:<port>/demo/

Running the tests

polymer test --npm

Package Sidebar

Install

npm i @oyeharry/app-menu

Weekly Downloads

2

Version

3.0.0-pre.2

License

MIT

Unpacked Size

38.9 kB

Total Files

13

Last publish

Collaborators

  • oyeharminder