How to use the antd-mobile.Checkbox.CheckboxItem function in antd-mobile

To help you get started, we’ve selected a few antd-mobile examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ZevenFang / react-native-web / src / components / TodoList.js View on Github external
import React from 'react';
import { List, InputItem, Icon, Toast, Checkbox, Modal } from 'antd-mobile';
import { createForm } from 'rc-form';
import { connect } from 'react-redux';
import Touch from './Touch';
import Text from './Text';
import { firstError } from '../utils/rcform';

const CheckboxItem = Checkbox.CheckboxItem;

@connect(({ todo }) => ({ todo }))
class TodoList extends React.Component {

  componentDidMount() {
    if (window.platform) { // 只在 ReactNative 中使用
      this.props.screenProps.stackNavigation.setParams({
        title: 'Todos', drawerNavigation: this.props.navigation,
      });
    }
  }

  onSave = () => {
    const { form, dispatch } = this.props;
    form.validateFields({ first: false }, async (error, value) => {
      if (error) Toast.fail(firstError(error), 1);
github ant-design / ant-design-mobile / components / checkbox / demo / basic.native.tsx View on Github external
// tslint:disable:jsx-no-multiline-js
import { Checkbox, List, WhiteSpace } from 'antd-mobile';
import React from 'react';
import { Text, View } from 'react-native';
const AgreeItem = Checkbox.AgreeItem;
const CheckboxItem = Checkbox.CheckboxItem;

export default class BasicCheckboxExample extends React.Component {
  constructor(props: any, context: any) {
    super(props, context);
    this.state = {
      checkBox1: true,
      agreeItem1: true,
      checkboxItem1: true,
    };
  }

  render() {
    return (
github smalltide / react-native-antd / index.ios.js View on Github external
useCheckbox() {
    const AgreeItem = Checkbox.AgreeItem;
    const CheckboxItem = Checkbox.CheckboxItem;

    return (
github ruichengping / react-mobile-qqMusic / src / components / SongMenuMangement / index.js View on Github external
import React from 'react';
import { connect } from 'react-redux';
import {bindActionCreators} from 'redux';
import {Checkbox} from 'antd-mobile';
import * as actions from '@/store/actions';
import './style.scss';
const CheckboxItem = Checkbox.CheckboxItem;
@connect(
    (state)=>state.global,
    (dispatch)=>bindActionCreators(actions,dispatch)
)
class SongMenuMangement extends React.Component{
    state={
        selectedList:[]
    }
    comeback=()=>{
        this.props.songMenuMangementShowSwitch();
    }
    changeSelectedList(text){
        const isCanAdd=!this.state.selectedList.some((item)=>{
            return text===item;
        });
        let selectedList=this.state.selectedList;
github wujiabk / zhaopinApp / src / container / register / register.js View on Github external
render (){
        const RadioItem = Radio.RadioItem;
        const CheckboxItem = Checkbox.CheckboxItem;

        return (
            <div>
                {this.props.redirect?:null}
                }
                    onLeftClick={() =&gt; this.props.history.push("/login")}
                &gt;注册
                
                
                    </div>