npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

xiurobert-ac-qrcode-rn

v2.3.2

Published

AC-QRCode improved

Downloads

5

Readme

xiurobert-ac-qrcode-rn

Features and Changes

  • Supports QR Codes ONLY
  • Supports both Android and iOS
  • Based on react-native-camera
  • Simple to use scanning boundary
  • Supports enabling and disabling torchlight via a prop

Installation

$ yarn add xiurobert-ac-qrcode-rn
$ yarn add react-native-camera
$ react-native link react-native-camera

Basic usage

import React,{Component} from 'react'
import { Text, StyleSheet } from 'react-native'
import { QRScannerView } from 'ac-qrcode-rn'
import { Toast } from 'antd-mobile-rn'

class DefaultScreen extends Component {
  constructor(props) {
    super(props)
  }

  componentDidMount() {}
  
  onScanResultReceived = ({ data, type }) => {
    console.log(`Type: ${type}\nData: ${data}`)
    // do anything
  }

  renderTopBarView() {
    return (
      <Text style={styles.text}>Insert your top menu here</Text>
    )
  }

  renderBottomMenuView() {
    return (
      <Text style={styles.text}>Insert your bottom menu here</Text>
    )
  }

  render() {
    return (
      <QRScannerView
        onScanResultReceived={this.onScanResultReceived}
        renderTopBarView={this.renderTopBarView}
        renderBottomMenuView={this.renderBottomMenuView}
      />
    )
  }
}

const styles = StyleSheet.create({
  text: {
    color: 'white',
    textAlignVertical: 'center',
    textAlign: 'center',
    fontSize: 20,
    padding: 12,
  },
})

export default DefaultScreen

Props

| Prop | Type | Default Value | Optional | Explanation | |:--------------------: |:------: |:----------------------------------------------------------------------: |:--------: |:----------------------------------------: | | maskColor | string | #0000004D | true | Mask colour | | borderColor | string | #000000 | true | Border colour | | cornerColor | string | #000000 | true | Corner colour | | borderWidth | number | 0 | true | Border width | | cornerBorderWidth | number | 4 | true | Corner width | | cornerBorderLength | number | 20 | true | Corner height | | rectHeight | number | 200 | true | Scanning rectangle height | | rectWidth | number | 200 | true | Scanning rectangle height | | isCornerOffset | bool | false | true | Whether the corners are offset | | cornerOffsetSize | number | 0 | true | Corner offset size | | bottomMenuHeight | number | 0 | true | Height of the bottom menu | | scanBarAnimateTime | number | 2500 | true | Time for the scan bar to move down fully | | scanBarColor | string | #22ff00 | true | Colour of the animated scan bar | | scanBarImage | any | null | true | Image to be used for the scan bar | | scanBarHeight | number | 1.5 | true | Height of the scan bar | | scanBarMargin | number | 6 | true | Margins of the scan bar | | hintText | string | Align the QR code within the viewfinder | true | Hint | | hintTextStyle | object | { color: '#fff', fontSize: 14,backgroundColor:'transparent'} | true | Hint text style | | hintTextPosition | number | 130 | true | Absolute position of the hint text | | isShowScanBar | bool | true | true | Should show scan bar? | | bottomMenuStyle | object | - | true | Bottom menu style | | renderTopBarView | func | - | false | Function to render the top menu view | | renderBottomMenuView | func | - | false | Function to render the bottom menu view | | onScanResultReceived | func | - | false | Function to call when QR code is scanned | | torchEnabled | bool | false | true | Whether the torchlight is enabled |

Credits