@saulpalv/use-responsive-class-effect
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

A react hook for getting a variable previous state

Install

npm i @saulpalv/use-responsive-class-effect

//or

yarn add @saulpalv/use-responsive-class-effect

Usage

import { muiBreakPoints, useResponsiveClassNameEffect } from "@saulpalv/use-responsive-class-effect"

export const App = () => {

    const className = useResponsiveClassNameEffect(muiBreakPoints)

    return (
        <div css={{
            /**
             * Blue background style applied on medium (md) breakpoint 
             * range 1200px > windows width > 900px
             */
            '.md &': { backgroundColor: 'blue' }
        }}>
            hello
        </div>
    )
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    5
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    5

Package Sidebar

Install

npm i @saulpalv/use-responsive-class-effect

Weekly Downloads

3

Version

1.0.0

License

mit

Unpacked Size

12.6 kB

Total Files

15

Last publish

Collaborators

  • saulpalv