UNPKG

@antmjs/vantui

Version:

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

39 lines 1.22 kB
import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; /* eslint-disable */ import react from 'react'; import { ActionSheet, Button } from '@antmjs/vantui'; import { jsx as _jsx } from "react/jsx-runtime"; import { Fragment as _Fragment } from "react/jsx-runtime"; import { jsxs as _jsxs } from "react/jsx-runtime"; export default function Demo() { var _react$useState = react.useState(false), _react$useState2 = _slicedToArray(_react$useState, 2), show = _react$useState2[0], setShow = _react$useState2[1]; var _react$useState3 = react.useState([{ name: '着色选项', color: '#ee0a24' }, { loading: true }, { name: '禁用选项', disabled: true }]), _react$useState4 = _slicedToArray(_react$useState3, 1), actions = _react$useState4[0]; return /*#__PURE__*/_jsxs(_Fragment, { children: [/*#__PURE__*/_jsx(ActionSheet, { show: show, actions: actions, onClose: function onClose() { return setShow(false); } }), /*#__PURE__*/_jsx(Button, { type: "primary", onClick: function onClick() { return setShow(true); }, children: "\u5F39\u51FA\u83DC\u5355" })] }); }