@splunk/react-page
v7.1.0
Published
Load React components into the latest layout from Splunk Enterprise
Downloads
3,509
Readme
@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.
- Install the peer dependencies:
npm install react@^16 react-dom@^16 styled-components@^5
- 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' });