npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

@sharyn/hocs

4.5.0 • Public • Published

🌹 @sharyn/hocs

npm

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>
)

Keywords

none

install

npm i @sharyn/hocs

Downloadsweekly downloads

4

version

4.5.0

license

MIT

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability