1.0.14 • Published 7 years ago

react-sticky-element-watcher v1.0.14

Weekly downloads
87
License
MIT
Repository
-
Last release
7 years ago

React Sticky Element Watcher

The CSS property position: sticky lacks an :active pseudo-class for applying styles when a element is "stuck".

Installation

npm install react-sticky-element-watcher

Usage

import React from 'React'
import StickyElementWatcher from 'react-sticky-element-watcher'

export default () => (
    <StickyElementWatcher
        render={({ isStuck }) => (
            <nav style={{
                position: 'sticky',
                top: '10px',
                backgroundColor: isStuck ? 'red' : 'white'
            }}>
                Logo: link1, link2
            </nav>
        )}
    />
)
1.0.14

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago