@splunk/react-page

7.0.0 • Public • Published

@splunk/react-page

Loads a React component into the latest layout from the Splunk Enterprise server, including the Splunk bar, app bar, and a footer around your page content.

This package dynamically loads the Layout API from the correct location.

Using this package requires splunkd partials to be loaded on the page.

Install

Install the package and its dependencies.

  1. Install the peer dependencies:
    npm install react@^16 react-dom@^16 styled-components@^5
    
  2. Install the package:
    npm install @splunk/react-page
    

Usage

In a basic scenario, the layout takes a React element and an optional options object.

import layout from '@splunk/react-page';
import MyPage from 'pages/MyPage';

layout(<MyPage />, { pageTitle: 'A React Page', hideFooter: true, layout: 'fixed' });

Readme

Keywords

none

Package Sidebar

Install

npm i @splunk/react-page

Weekly Downloads

271

Version

7.0.0

License

Apache-2.0

Unpacked Size

42.2 kB

Total Files

8

Last publish

Collaborators

  • splunker
  • splunk_sui_publish