You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

rax-checkbox

Package Overview
Dependencies
Maintainers
5
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rax-checkbox

Checkbox component for Rax.

1.0.0-beta.1
latest
npmnpm
Version published
Weekly downloads
6
-50%
Maintainers
5
Weekly downloads
 
Created
Source

CheckBox 选择框

CheckBox 是基础的选择框,选择框用图片实现,支持用户使用自己的图片进行替换

安装

$ npm install rax-checkbox --save

引用

import CheckBox from "rax-checkbox";

属性

名称类型默认值描述
checkedBoolean选中状态
checkedImageString选中图片
uncheckedImageString非选中图片
containerStyleObject选择框容器样式
checkboxStyleObject选择框图片样式
onChangeFunction选择事件

基本示例

// demo
/* eslint-disable import/no-extraneous-dependencies */
import { createElement, render, useRef, useEffect } from 'rax';
import DU from 'driver-universal';
import View from 'rax-view';
import CheckBox from 'rax-checkbox';

const App = () => {
  const checkboxRef = useRef(null);
  useEffect(() => {
    console.log(checkboxRef);
  });
  return <View ><CheckBox ref={checkboxRef} /></View>;
};

render(<App />, document.body, {
  driver: DU
});

Keywords

Rax

FAQs

Package last updated on 26 Aug 2019

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.