JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q21138F
  • License MIT

Basic header bar with RWD.

Package Exports

  • header-bar

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (header-bar) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

header-bar

Basic header bar with RWD.

Installation

npm install --save-dev header-bar

Usage

Javascript

import React from 'react';
import HeaderBar from 'header-bar';

class App extends React.Component {
    return <div className='app'>
        <HeaderBar
          logo={{ src:'/img/logo.svg', title:'LOGO' }}
          hamburger={{ src:'/img/hamburger.svg', title:'Menu' }}
        >
            <a href='//nav.link.href' data-color='rgb(64, 124, 156)' data-match='nav.link.href'>nav-link-1</a>
            <a href='//localhost' data-color='goldenrod' data-match='local(.*)'>nav-link-2</a>
            <a href='//facebook.com' data-subnav={true} data-color='rgb(62, 86, 155)'><img src='/img/facebook.svg'/></a>
            <a href='//sub.nav.link' data-subnav={true} data-color='rgb(229, 26, 0)'>sub-nav-link</a>
            <div data-submenu={true} ><a href='/login' title='login'>登入</a></div>
        </HeaderBar>
    </div>;
}

LESS

@import (inline) '../node_modules/header-bar/lib/css/index.css';

Demo

cd node_module/header-bar/demo
npm install
npm start

Open demo page on http://localhost:3000