How to use the @alicloud/console-components.Checkbox.Group function in @alicloud/console-components

To help you get started, we’ve selected a few @alicloud/console-components 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 aliyun / alibabacloud-console-components / packages / component / src / components / form / demo / demo12.js View on Github external
import React from 'react'
import {
  Form,
  Input,
  Button,
  Checkbox,
  Field,
} from '@alicloud/console-components'
import { combineReducers, createStore } from 'redux'
import { Provider, connect } from 'react-redux'

const CheckboxGroup = Checkbox.Group
function formReducer(
  state = { email: '', username: 'xiachi', fruit: ['apple'] },
  action
) {
  switch (action.type) {
    case 'save_fields':
      return {
        ...state,
        ...action.payload,
      }
    default:
      return state
  }
}

class FormDemo extends React.Component {