🚀 Socket Launch Week Day 4:Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection.Learn more
Sign In

react-expressions-baidu

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-expressions-baidu

A React Component about Baidu Expressions.

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

react-expressions-baidu

A React Component about Baidu Expressions.

Install

npm install --save react-expressions-baidu

Usage

import { 
    BaiduExpressionsPicker, 
    isSymbol, 
    convertSymbol 
} from 'react-expressions-baidu';

...


handleAddSymbol(symbol){

    // check input valid
    if(isSymbol(symbol))
        this.setState({
            symbols: [...symbols, symbol]
        });

}

render(){

    ...

    <BaiduExpressionsPicker
        onSymbolClick={this.handleAddSymbol} />

    <div>

        {
            this.state.symbols.map(symbol => convertSymbol(symbol))
        }

    </div>

}


API

BaiduExpressionsPicker [ react component ]

props:

  • pickerClass [ string ]
  • symbolClass [ string ]
  • onItemClick [ func ]

isSymbol [ func | string -> bool ]

check if str is a valid symbol.

convertSymbol [ func | symbol[string], key[string(option)] -> ReactDOM Node ]

Keywords

Baidu Expressions

FAQs

Package last updated on 12 Nov 2017

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