🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

ducktape-button

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ducktape-button

sticky button for webview environment in iOS

latest
npmnpm
Version
0.0.12
Version published
Weekly downloads
7
Maintainers
1
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 19 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts