@sharyn/hocs
v4.5.0
Published
[![npm](https://img.shields.io/npm/v/@sharyn/hocs.svg)](https://www.npmjs.com/package/@sharyn/hocs)
Downloads
49
Readme
🌹 @sharyn/hocs
This package provides React High-Order Components.
🌹 Install
yarn add @sharyn/hocs
🌹 Usage
hideOnScroll
import React from 'react'
import AppBar from '@material-ui/core/AppBar'
import ToolBar from '@material-ui/core/ToolBar'
import Typography from '@material-ui/core/Typography'
import hideOnScroll from '@sharyn/hocs/hide-on-scroll'
const AutoHideAppBar = hideOnScroll(AppBar)
const App = () => (
<AutoHideAppBar className="hide-on-scroll">
<ToolBar>
<Typography variant="h6" color="inherit">
Hello
</Typography>
</ToolBar>
</AutoHideAppBar>
)