@auraxy/react-luosimao
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

@auraxy/react-luosimao

NPM Version Download Month gzip with dependencies: kb typescript pkg.module

pkg.module supported, which means that you can apply tree-shaking in you project

中文文档

luosimao

Installation

npm i -S @auraxy/react-luosimao

Global name - The variable the module exported in umd bundle

ReactLuoSiMao

Interface

See what method or params you can use in index.d.ts

Usage

import React, { useState } from 'react'
import { ReactLuoSiMao, resetLuoSiMao } from '@auraxy/react-luosimao'

const SignUp = () => {
  const [captcha, setCaptcha] = useState('')
  
  const submit = () => {
    api().finally(() => {
      resetLuoSiMao()
    })
  }
  
  return (
    <div>
      ...other form items
      <ReactLuoSiMao
        siteKey="6949f47d7f1f236a091befa93f"
        onChange={setCaptcha}
      />
    </div>
  )
}

style

For building style, you may need to import the css or scss file:

// scss
import 'node_modules/@auraxy/react-luosimao/lib/css/index.scss'

// css
import 'node_modules/@auraxy/react-luosimao/lib/css/index.css'

Or

// scss
@import 'node_modules/@auraxy/react-luosimao/lib/css/index.scss'

// css
@import 'node_modules/@auraxy/react-luosimao/lib/css/index.css'

Or, you can build your custom style by copying, editing and importing node_modules/@auraxy/react-luosimao/lib/css/index.scss

QA

  1. Error Error: spawn node-sass ENOENT

You may need install node-sass globally, npm i -g node-sass

Readme

Keywords

Package Sidebar

Install

npm i @auraxy/react-luosimao

Weekly Downloads

4

Version

1.1.1

License

MIT

Unpacked Size

22.5 kB

Total Files

10

Last publish

Collaborators

  • auraxy