Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@opuscapita/oc-cm-navigation-header

Package Overview
Dependencies
Maintainers
29
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opuscapita/oc-cm-navigation-header

OpusCapita CM Navigation Header.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
29
Created
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.

  • With webpack use resolve.mainFields to configure the module type.
  • Add SASS loader to support importing of SASS styles.

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

Package last updated on 22 Jan 2020

Did you know?

Socket

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