1.0.1 • Published 2 years ago

react-native-telpo-library v1.0.1

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

react-native-telpo-library

Resimator private library

Installation

npm install react-native-telpo-library

Usage

import { usePrinter } from 'react-native-telpo-library';

// ...
//for printer
const {
  getPrinterList,
  printerConnect,
  printReceip,
  currentPrinter,
  closePrinter,
} = usePrinter();

//for scale
const { openScaling, dataReceived, message, stopScaling, startScaling } =
  useScale();

API

getPrinterList(): Get printer list

printerConnect(productId:string, vendorId:string): connect printer

printReceipt(value:string): Print receipt

currentPrinter: get connect printer

closePrinter(): Close the printer connection

// scale
openScaling(): This method open the port for scaling in device

dataReceived: Variable store data received from scale

message: store the scale messages(i.e error or update message)

stopScaling(): Stop the scaling

startScaling(): Start scaling

Component

<PrinterList/> : Render the list of the printer or device connected to POS device.
1.0.1

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago