Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@trendmicro/react-navbar
Advanced tools
React Navbar
Demo: https://trendmicro-frontend.github.io/react-navbar
npm install --save react react-sticky@5 @trendmicro/react-navbar
@trendmicro/react-navbar
and all dependent styles in your application as follows:import Navbar from '@trendmicro/react-navbar';
// Be sure to include styles at some point, probably during your bootstraping
import '@trendmicro/react-dropdown/dist/react-dropdown.css';
import '@trendmicro/react-navs/dist/react-navs.css';
import '@trendmicro/react-navbar/dist/react-navbar.css';
import Anchor from '@trendmicro/react-anchor';
import Dropdown from '@trendmicro/react-dropdown';
import Navbar from '@trendmicro/react-navbar';
import { Nav, NavDropdown, NavItem, MenuItem } from '@trendmicro/react-navs';
import PropTypes from 'prop-types';
import React from 'react';
import { StickyContainer, Sticky } from 'react-sticky';
import styles from './index.styl';
const noop = () => {};
const PageContent = () => (
<div
style={{
border: '1px solid #ddd',
backgroundColor: '#f5f5f5',
height: 600,
marginTop: 15
}}
>
<div className="container-fluid">
<h3>Page Content</h3>
</div>
</div>
);
const StickyNavbar = ({ state, actions }) => {
return (
<StickyContainer>
<header className={styles.siteHeader}>
<Anchor>
<i className={styles.banner} />
<h1 className={styles.title}>Product Name</h1>
</Anchor>
</header>
<Sticky>
<Navbar>
<Navbar.Header>
<Navbar.Toggle />
</Navbar.Header>
<Nav
navStyle="navbar"
activeKey={state.tab}
onSelect={actions.selectTab}
>
<NavItem className="text-center" style={{ minWidth: 72 }}>
<i className="fa fa-star" style={{ color: '#fff' }} />
</NavItem>
<NavDropdown
autoOpen
noCaret
eventKey="dashboard"
title="Dashboard"
>
<MenuItem eventKey="dashboard.1">Menu Item 1</MenuItem>
<MenuItem eventKey="dashboard.2">Menu Item 2</MenuItem>
<MenuItem eventKey="dashboard.3">Menu Item 3</MenuItem>
<MenuItem eventKey="dashboard.4">Menu Item 4</MenuItem>
</NavDropdown>
<NavDropdown
autoOpen
noCaret
eventKey="administration"
title="Administration"
>
<MenuItem eventKey="administration.1">Menu Item 1</MenuItem>
<MenuItem eventKey="administration.2">Menu Item 2</MenuItem>
<MenuItem eventKey="administration.3">Menu Item 3</MenuItem>
<MenuItem eventKey="administration.4">
Menu item 4
<MenuItem eventKey="administration.4.1">
Second level item one
</MenuItem>
<MenuItem eventKey="administration.4.2">
Second level item two
</MenuItem>
</MenuItem>
</NavDropdown>
</Nav>
</Navbar>
</Sticky>
<PageContent />
</StickyContainer>
);
};
StickyNavbar.propTypes = {
state: PropTypes.object,
actions: PropTypes.object
};
export default StickyNavbar;
import React from 'react';
import ReactDOM from 'react-dom';
import StickyNavbar from './StickyNavbar.jsx';
class App extends React.Component {
state = {
tab: ''
};
actions = {
selectTab: (eventKey, event) => {
if (!eventKey) {
return;
}
const tab = eventKey.replace(/\..+/g, '');
this.setState({ tab });
}
};
render() {
return (
<StickyNavbar
state={this.state}
actions={this.actions}
/>
)
}
}
ReactDOM.render(<App />, document.getElementById('container'));
.site-header {
position: relative;
padding: 0 20px;
height: 64px;
margin-bottom: 0;
background-color: #fff;
a:link,
a:hover,
a:active,
a:visited,
a:focus {
color: #222;
text-decoration: none;
}
.banner {
width: 32px;
height: 32px;
margin: 16px 0;
margin-right: 10px;
background: url("./tball.svg") center left no-repeat;
float: left;
}
.title {
padding: 16px 0;
font-family: "Interstate-Light", Arial, "Helvetica Neue", Helvetica, sans-serif;
font-size: 26px;
font-weight: 200;
letter-spacing: -.03em;
white-space: nowrap;
}
}
Name | Type | Default | Description |
---|
MIT
FAQs
Trend Micro Components: React Navbar
The npm package @trendmicro/react-navbar receives a total of 179 weekly downloads. As such, @trendmicro/react-navbar popularity was classified as not popular.
We found that @trendmicro/react-navbar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.