@splunk-eap/react-scs-nav
TypeScript icon, indicating that this package has built-in type declarations

3.1.0 • Public • Published

SCS Nav

Navigation Bar for Apps on Splunk Cloud Services platform.

Install

npm install @splunk/react-scs-nav@3.1.0

Or

yarn add @splunk/react-scs-nav@3.1.0

Imports

Components

import Nav, {
    MenuItem,
    AppNavItem,
    AppNavDropdown,
    AboutIcon,
    FeedbackIcon,
    HelpIcon,
    SettingsIcon,
} from '@splunk/react-scs-nav/';

Providers

import NavProvider from '@splunk/react-scs-nav/NavProvider';
import NavMockProvider from '@splunk/react-scs-nav/NavMockProvider';

Themes

import themes from '@splunk/react-scs-nav/themes';

Configuring your app for compatibility

Logo

Place your logo file in the root of your application. It should be 48 pixels tall with no margins or padding.

/logo-dark-48.png

App Switcher

The app switcher will pass in the tenant via a query string parameter. This allows you to determine your own url schema. Additional parameters may be added in the future, such as locale.

/r/switchApp?tenantName=demotenant

Redirecting with react-router and IE 11 support:

import queryString from 'query-string';

...

<Route
    path="/r/switchApp"
    render={props => (
        <Redirect
            to={`/${queryString.parse(props.location.search).tenantName}/`}
        />
    )}
/>

Redirecting with react-router and no IE 11 support:

<Route
    path="/r/switchApp"
    render={props => (
        <Redirect
            to={`/${new URLSearchParams(props.location.search).get('tenantName')}/`}
        />
    )}
/>

Readme

Keywords

none

Package Sidebar

Install

npm i @splunk-eap/react-scs-nav

Weekly Downloads

0

Version

3.1.0

License

UNLICENSED

Unpacked Size

300 kB

Total Files

60

Last publish

Collaborators

  • weitao_splunk