Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add drag panel & popover component (1) #153

Closed
wants to merge 1 commit into from

Conversation

BoBoooooo
Copy link
Contributor

  • Popover
 interface PopoverProps {
  open?: boolean;
  /**
   * 浮层内容
   */
  overlay: React.ReactNode;
  /**
   * 浮层打开或关闭时的回调
   */
  onOpenChange?: (open: boolean) => void;
  /**
   * 浮层被遮挡时自动调整位置
   */
  autoAdjustOverflow?: boolean;
  /**
   * 点击蒙层是否允许关闭
   */
  maskClosable?: boolean;
  /**
   * 手动唤起时的位置
   */
  left?: number;
  /**
   * 手动唤起时的位置
   */
  top?: number;
  /**
   * z-index
   */
  zIndex?: number;
  /**
   * popoverStyle
   */
  popoverStyle?: React.CSSProperties;
  children?: React.ReactNode;
}
  • DragPanel
interface DragPanelProps extends PopoverProps {
  // 标题
  title?: React.ReactNode | string;
  // 内容
  body?: React.ReactNode | string;
  // 底部
  footer?: ((close: () => void) => React.ReactNode) | React.ReactNode | string;
  // 宽度
  width?: number | string;
  // 右上角区域
  extra?: React.ReactNode | string;
}
<DragPanel
  title="标题"
  extra="右上角内容"
  width={700}
  body={
    <Box>
      内容
    </Box>
  }
  footer={
    <Text>
      底部信息
    </Text>
  }
>
  <Action tooltip="打开表达式变量选择面板" icon={<ExpandAltOutlined />} size="small" />
</DragPanel>

@BoBoooooo BoBoooooo changed the title feat: add drag panel & popover component feat: add drag panel & popover component (1) May 20, 2024
@BoBoooooo BoBoooooo closed this May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant