add-onenter-for-react
TypeScript icon, indicating that this package has built-in type declarations

1.2.4 • Public • Published

Add-onEnter-For-React

This module is React/Next Component, which enable you add onEnter/onShiftEnter/onControlEnter Method to ChildComponent.

Installation

This module is available as an npm package.

// with npm
npm install add-onenter-for-react

// with yarn
yarn add add-onenter-for-react

Usage

Here is a quick example to get you started, it's all you need:

import AddonEnter from "add-onenter-for-react"

function Enter(){
    alert('Enter!!')
}

function ShiftEnter(){
    alert('ShiftEnter!!')
}

function ControlEnter(){
    alert('ControlEnter!!')
}

function App() {
    return(
        <AddonEnter
          onEnter={Enter()}
          onShiftEnter={ShiftEnter()}
          onControlEnter={ControlEnter()}
        >
        <TextArea />
        </AddonEnter>
    )
}

API

Property type
onEnter ?Function
onShiftEnter ?FUnction
onControlEnter ?Function

Package Sidebar

Install

npm i add-onenter-for-react

Weekly Downloads

0

Version

1.2.4

License

MIT

Unpacked Size

8.72 kB

Total Files

7

Last publish

Collaborators

  • shinyaigeek