123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- import React, { PureComponent, useState } from 'react';
- import { Tooltip, Button, Popover } from '@douyinfe/semi-ui';
- import { PopupContent, Trigger } from './common';
- const Left2Right = () => {
- const [pos, setPos] = useState('left');
- return (<div>
- <Tooltip
- content={
- <PopupContent
- w={200}
- h={200}
- />
- }
- arrowPointAtCenter={false}
- visible
- trigger='custom'
- position={pos}
- key={pos}
- >
- <Trigger
- w={100}
- h={100}
- style={{
- position: 'absolute',
- top: 70
- }}
- >
- pos: {pos}
- </Trigger>
- </Tooltip>
- </div>);
- };
- const Left2RightTop = () => {
- const [pos, setPos] = useState('left');
- return (<div>
- <Tooltip
- content={
- <PopupContent
- w={200}
- h={200}
- />
- }
- arrowPointAtCenter={false}
- visible
- trigger='custom'
- position={pos}
- key={pos}
- >
- <Trigger
- w={100}
- h={100}
- // style={{
- // position: 'absolute',
- // right: 0,
- // top: 0
- // }}
- />
- </Tooltip>
- </div>);
- };
- const Left2RightBottom = () => {
- const [pos, setPos] = useState('left');
- return (<div
- style={{
- }}
- >
- <Tooltip
- content={
- <PopupContent
- w={200}
- h={200}
- />
- }
- arrowPointAtCenter={false}
- visible
- trigger='custom'
- position={pos}
- key={pos}
- >
- <Trigger
- w={100}
- h={100}
- style={{
- position: 'absolute',
- // right: 0,
- bottom: 0
- }}
- />
- </Tooltip>
- </div>);
- };
- const Left2LeftTop = () => {
- const [pos, setPos] = useState('left');
- return (<div
- style={{
- }}
- >
- <Tooltip
- content={
- <PopupContent
- w={200}
- h={200}
- />
- }
- arrowPointAtCenter={false}
- visible
- trigger='custom'
- position={pos}
- key={pos}
- >
- <Trigger
- w={100}
- h={100}
- style={{
- position: 'absolute',
- right: 0,
- top: 50
- }}
- />
- </Tooltip>
- </div>);
- };
- const Left2LeftBottom = () => {
- const [pos, setPos] = useState('left');
- return (<div
- style={{
- }}
- >
- <Tooltip
- content={
- <PopupContent
- w={200}
- h={200}
- />
- }
- arrowPointAtCenter={false}
- visible
- trigger='custom'
- position={pos}
- key={pos}
- >
- <Trigger
- w={100}
- h={100}
- style={{
- position: 'absolute',
- right: 0,
- bottom: 0
- }}
- />
- </Tooltip>
- </div>);
- };
- export { Left2Right, Left2RightTop, Left2RightBottom, Left2LeftTop, Left2LeftBottom };
|