MCPcopy Create free account
hub / github.com/szhsin/react-menu / HeaderBanner

Function HeaderBanner

example/src/components/HeaderBanner.js:4–18  ·  view source on GitHub ↗
({ onClose })

Source from the content-addressed store, hash-verified

2import { version } from '../utils';
3
4export function HeaderBanner({ onClose }) {
5 const isFullSize = useDomInfo().vWidth > 700;
6
7 return (
8 <div className="header-banner" role="alert">
9 {isFullSize && <span className="banner-text">This website is for React-Menu v{version}</span>}
10 <a href="https://szhsin.github.io/react-menu/">
11 {isFullSize ? 'You can find the latest version here.' : 'Visit the latest version'}
12 </a>
13 <i className="close-btn material-icons" onClick={onClose}>
14 close
15 </i>
16 </div>
17 );
18}

Callers

nothing calls this directly

Calls 1

useDomInfoFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…