All files / src/checkbox/_example CheckboxColumnExample.jsx

66.67% Statements 2/3
100% Branches 0/0
50% Functions 1/2
66.67% Lines 2/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30        1x   1x                                              
import React, { useState } from "react";
import { Checkbox } from "@tencent/tea-component/lib/checkbox";
 
export default function CheckboxColumnExample() {
  const [paymode, setPaymode] = useState([]);
 
  return (
    <>
      <Checkbox.Group
        value={paymode}
        onChange={value => setPaymode(value)}
        layout="column"
      >
        <Checkbox name="prepaid" tooltip="给了钱再用">
          预付费
        </Checkbox>
        <Checkbox name="billing" tooltip="用了再给钱">
          后付费
        </Checkbox>
        <Checkbox name="subscription" tooltip="每个月自动扣钱">
          订阅模式
        </Checkbox>
        <Checkbox name="friend" disabled tooltip="Yomee 帮你给钱">
          朋友代付
        </Checkbox>
      </Checkbox.Group>
    </>
  );
}