0.0.12 • Published 2 years ago

ducktape-button v0.0.12

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

ducktape-button

sticky button for webview environment in iOS

installation

yarn add ducktape-button

usage

import { useRef } from 'react'
import createStickyButton from 'ducktape-button';

const useStickyButton = createStickyButton();

const ExampleComponent = () => {
  const inputEl = useRef();

  const { buttonEl, isButtonSticky } = useSticky({
    inputs: [inputEl],
    buttonMarginBottom: 0 // Control margin-bottom from virtual keyboard, if you need
  })

  return (
    <div>
      <input ref={inputEl} />
      <button 
        style={{ border: isButtonSticky ? '1px solid red' : '1px solid black' }} 
        ref={buttonEl}>
          click
      </button>
    </div>
  )
}
0.0.11

2 years ago

0.0.12

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago