Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
rax-checkbox
Advanced tools
描述: CheckBox 是基础的选择框,选择框用图片实现,支持用户使用自己的图片进行替换
$ npm install rax-checkbox --save
import CheckBox from "rax-checkbox";
注: 1、支持列表中的 代表 h5 代表 weex 代表小程序
属性 | 类型 | 默认值 | 必填 | 描述 | 支持 |
---|---|---|---|---|---|
defaultChecked | boolean | false | 默认选中状态 | ||
checked | boolean | - | 选中状态 | ||
checkedImage | string | 选中图片 | |||
uncheckedImage | string | 非选中图片 | |||
containerStyle | CSSProperties | - | 选择框容器样式 | ||
checkboxStyle | CSSProperties | - | 选择框图片样式 | ||
onChange | (checked: boolean) => void | - | 选择事件 |
// demo
/** @jsx createElement */
"use strict";
import { createElement, render, useState } from "rax";
import DU from "driver-universal";
import Checkbox from "rax-checkbox";
import View from "rax-view";
import Text from "rax-text";
const App = () => {
const [checked, setChecked] = useState(false);
const [controlledCheckboxMsg, setControlledCheckboxMsg] = useState("");
const [unControlledCheckboxMsg, setUncontrolledCheckboxMsg] = useState("");
return (
<View>
<Text>Controlled: {controlledCheckboxMsg}</Text>
<Checkbox
checked={checked}
onChange={hasChecked => {
setControlledCheckboxMsg(`onChange => ${hasChecked}`);
}}
>
{value => <Text>{value}</Text>}
</Checkbox>
<View
style={{
paddingLeft: 15,
paddingRight: 15,
backgroundColor: "#1890FF",
width: 200,
borderRadius: 15,
alignItems: "center",
justifyContent: "center"
}}
onClick={() => {
setChecked(!checked);
}}
>
<Text style={{ color: "#fff" }}>Click Me!</Text>
</View>
<Text>Uncontrolled: {unControlledCheckboxMsg}</Text>
<Checkbox
defaultChecked
onChange={hasChecked => {
setUncontrolledCheckboxMsg(`onChange => ${hasChecked}`);
}}
>
{value => <Text>{value}</Text>}
</Checkbox>
</View>
);
};
render(<App />, document.body, {
driver: DU
});
FAQs
Checkbox component for Rax.
The npm package rax-checkbox receives a total of 5 weekly downloads. As such, rax-checkbox popularity was classified as not popular.
We found that rax-checkbox demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
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.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.