UNPKG

@antmjs/vantui

Version:

一套适用于Taro3及React的vantui组件库

36 lines 1.15 kB
import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; /* eslint-disable */ import react from 'react'; import { RadioGroup, CellGroup, Cell, Radio } from '@antmjs/vantui'; import { jsx as _jsx } from "react/jsx-runtime"; import { jsxs as _jsxs } from "react/jsx-runtime"; export default function Demo() { var _react$useState = react.useState('1'), _react$useState2 = _slicedToArray(_react$useState, 2), value = _react$useState2[0], setValue = _react$useState2[1]; return /*#__PURE__*/_jsx(RadioGroup, { value: value, children: /*#__PURE__*/_jsxs(CellGroup, { children: [/*#__PURE__*/_jsx(Cell, { title: "\u5355\u9009\u6846 1", clickable: true, onClick: function onClick() { return setValue('1'); }, renderRightIcon: /*#__PURE__*/_jsx(Radio, { name: "1" }) }), /*#__PURE__*/_jsx(Cell, { title: "\u5355\u9009\u6846 2", clickable: true, onClick: function onClick() { return setValue('2'); }, renderRightIcon: /*#__PURE__*/_jsx(Radio, { name: "2" }) })] }) }); }