0.0.12 • Published 6 months ago

ducktape-button v0.0.12

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months 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

6 months ago

0.0.12

6 months ago

0.0.10

7 months ago

0.0.9

7 months ago

0.0.8

7 months ago

0.0.7

7 months ago

0.0.6

9 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago