1.1.0 • Published 5 years ago

@opuscapita/oc-cm-filtering-pane v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

oc-cm-filtering-pane

Description

Provides a filtering pane with optional a tab based navigation (@opuscapita/react-responsive-navbar), left aligned content, right aligned content and dropdown menu (@opuscapita/react-dropdown).

Installation

npm install @opuscapita/oc-cm-filtering-pane

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
classstringrequiredID for the DOM element
idstringrequiredClass for the DOM element
tabstabsTypeDefines options for the responsive navigation bar (see tabsType for more information).
leftAlignedContentnodenullLeft aligned content
rightAlignedContentnodenullRight aligned content
menuItemsarray[]@opuscapita/react-dropdown: List of the dropdown menu items (check menuItems props from @opuscapita/react-dropdown)
Types
  • tabsType:
Prop nameTypeDefaultDescription
activeKeynumber or objectrequired@opuscapita/react-responsive-navbar: Navbar item to be active initially
listlistrequired@opuscapita/react-responsive-navbar: navigation items
onSelectfunctionnull@opuscapita/react-responsive-navbar: Callback fired when the active item changes
showNavItemBorderboolfalse@opuscapita/react-responsive-navbar: show bottom-border below navbar items
showNavItemTooltipbooltrue@opuscapita/react-responsive-navbar: enables tooltips for nav items

Code example

import React from "react";
import FilteringPane from "@opuscapita/oc-cm-filtering-pane";

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