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

Readme

Keywords

none

Package Sidebar

Install

npm i @sharyn/hocs

Weekly Downloads

15

Version

4.5.0

License

MIT

Unpacked Size

31.8 kB

Total Files

16

Last publish

Collaborators

  • sharyn