Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
cf-component-checkbox
Advanced tools
Cloudflare Checkbox Component
Installation with yarn is recommended
$ yarn add cf-component-checkbox
import React from 'react';
import {
Checkbox,
CheckboxUnstyled,
CheckboxTheme,
CheckboxGroup
} from 'cf-component-checkbox';
import { applyTheme } from 'cf-style-container';
const CheckboxGroupItem = applyTheme(CheckboxUnstyled, CheckboxTheme, ({}) => ({
marginTop: '1em',
'&:first-child': {
marginTop: 0
}
}));
class CheckboxComponent extends React.Component {
constructor(props) {
super(props);
this.state = {
checkbox1: true,
checkbox2: false,
checkboxValues: ['option1']
};
this.onCheckboxGroupChange = this.onCheckboxGroupChange.bind(this);
}
onCheckboxGroupChange(values) {
this.setState({
checkboxValues: values
});
}
render() {
return (
<div>
<p>
You can create them individually with <code>Checkbox</code>
</p>
<Checkbox
label="Checkbox 1"
name="checkbox-1"
value="checkbox1"
checked={this.state.checkbox1}
onChange={event => this.setState({ checkbox1: event.target.checked })}
/>
<Checkbox
label="Checkbox 2"
name="checkbox-2"
value="checkbox2"
checked={this.state.checkbox2}
onChange={event => this.setState({ checkbox2: event.target.checked })}
/>
<p>
Or as a group with <code>CheckboxGroup</code>
</p>
<CheckboxGroup
values={this.state.checkboxValues}
onChange={this.onCheckboxGroupChange}
>
<CheckboxGroupItem
label="Option 1"
name="group-option-1"
value="option1"
/>
<CheckboxGroupItem
label="Option 2"
name="group-option-2"
value="option2"
/>
</CheckboxGroup>
<p>
You can also disable a label by passing <code>false</code> explicitly
</p>
<Checkbox
label={false}
name="checkbox-1-no-label"
value="checkbox-nolabel"
checked={this.state.checkbox1}
onChange={event => this.setState({ checkbox1: event.target.checked })}
/>
</div>
);
}
}
export default CheckboxComponent;
FAQs
Cloudflare Checkbox Component
The npm package cf-component-checkbox receives a total of 1,509 weekly downloads. As such, cf-component-checkbox popularity was classified as popular.
We found that cf-component-checkbox demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 23 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.