Socket
Socket
Sign inDemoInstall

@opuscapita/oc-cm-navigation-header

Package Overview
Dependencies
116
Maintainers
29
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @opuscapita/oc-cm-navigation-header

OpusCapita CM Navigation Header.


Version published
Weekly downloads
1
Maintainers
29
Install size
92.7 MB
Created
Weekly downloads
 

Changelog

Source

1.0.0

  • Upgraded all packages (react 16.8.6, webpack4, babel 7)
  • Added Storybook

Readme

Source

oc-cm-navigation-header

Description

Provides a navigation header with back arrow, paging (@opuscapita/react-list-items), and a dropdown menu (@opuscapita/react-dropdown).

Installation

npm install @opuscapita/oc-cm-navigation-header

Demo

View the DEMO

Builds

UMD

The default build with compiled styles in the .js file. Also minified version available in the lib/umd directory.

CommonJS/ES Module

You need to configure your module loader to use cjs or es fields of the package.json to use these module types. Also you need to configure sass loader, since all the styles are in sass format.

API

Prop nameTypeDefaultDescription
titlestringnullTitle shown in the left side of the header
onBackClickfunctionnullBack button click callback. Button is hidden, if function is not provided.
dropdowndropdownTypeDefines options for the dropdown menu (see dropdownType for more information).
pagingpagingTypeDefines options for the paging (see pagingType for more information).
classNamestringCustom class name
idstringrequiredThe ID
rightContentnodenullan option to add custom right aligned content before dropdown menu
sideSectionBasisstring, number200pxSide column's (left, right) flex-basis value. The center column will take all the remaining space
Types
  • dropdownType:

For up-to-date information, please see: https://github.com/OpusCapita/react-dropdown/blob/master/README.md

Prop nameTypeDefaultDescription
menuItemsarray of menu itemsrequiredList of the dropdown menu items
caretbooleanfalseIf true, caret is show
disabledbooleanfalseIs dropdown disabled or not
dropupbooleanfalseIs dropup or dropdown
pullLeftbooleanfalseIf false, dropdown is aligned on right, otherwise on left
titlenumber, string or elementTitle of the dropdown
  • dropdownType - menu items:
Prop nameTypeDefaultDescription
disabledbooleanIs dropdown menu item disabled
disableClosingbooleanIs dropdown menu item's closing disabled
hrefstringHyperlink of the dropdown menu item
iconelementIcon of the dropdown menu item
idnumber or stringUnique HTML id attribute
onClickfunctionCallback function of click
titlenumber, string or elementTitle of the dropdown menu item
typestringEnumeration either 'item' or 'divider'
  • pagingType:

For up-to-date information, please see: https://github.com/OpusCapita/react-list-items/blob/master/src/list-items/README.md

Prop nameTypeDefaultDescription
disabledboolfalseA sign of a disabled status of navigation icons
goToItemfunctionrequiredCallback that is called when navigation to another item should happen
itemElementelementnullCustom component to render between navigation icons. By default it renders a string [m/n].
itemId[num, str]requiredInitially selected item id
itemIdslistrequiredList of item ids

Code example

import React from 'react';
import NavigationHeader from '@opuscapita/oc-cm-navigation-header';

export default class ReactView extends React.Component {
  render() {
    return (
      <NavigationHeader
        propName="propValue"
      />
    );
  }
}

FAQs

Last updated on 22 Jan 2020

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