All files / src/tooltip/_example TooltipSugarExample.jsx

100% Statements 1/1
100% Branches 0/0
100% Functions 1/1
100% Lines 1/1

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 31 32 33 34 35 36 37 38 39              1x                                                              
import React, { Fragment } from "react";
import { Text } from "@tencent/tea-component/lib/text";
import { Icon } from "@tencent/tea-component/lib/icon";
import { Button } from "@tencent/tea-component/lib/button";
import { Checkbox } from "@tencent/tea-component/lib/checkbox";
 
export default function TooltipSugarExample() {
  return (
    <Fragment>
      <section>
        <Text verticalAlign="middle">今年最爱金曲</Text>
        <Icon
          tooltip="根据播放次数统计"
          type="info"
          style={{ verticalAlign: "middle" }}
        />
        <Text verticalAlign="middle">:</Text>
        <Text tooltip="吴雨霏 - 吴哥窟" verticalAlign="middle">
          吴哥窟
        </Text>
        、
        <Text tooltip="张柏芝 - 留给最爱的说话" verticalAlign="middle">
          留给最爱的说话
        </Text>
        <Button
          tooltip="成为 QQ 音乐 VIP 无限播放"
          disabled
          style={{ marginLeft: 10 }}
        >
          ► 播放
        </Button>
      </section>
      <section>
        <Checkbox tooltip="很喜欢吗?">单曲循环</Checkbox>
      </section>
    </Fragment>
  );
}