From b787f260f28a3b7262847e7730d22699fa180026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bel=C3=A9n=20Curcio?= Date: Wed, 25 Jul 2018 17:33:49 -0300 Subject: [PATCH] Removing old implementation of attachment --- .../ui/components/Attachment/Attachment.css | 2 - .../ui/components/Attachment/Attachment.tsx | 62 ------------------- .../client/ui/components/Attachment/index.ts | 2 - 3 files changed, 66 deletions(-) delete mode 100644 src/core/client/ui/components/Attachment/Attachment.css delete mode 100644 src/core/client/ui/components/Attachment/Attachment.tsx delete mode 100644 src/core/client/ui/components/Attachment/index.ts diff --git a/src/core/client/ui/components/Attachment/Attachment.css b/src/core/client/ui/components/Attachment/Attachment.css deleted file mode 100644 index c3a2af639..000000000 --- a/src/core/client/ui/components/Attachment/Attachment.css +++ /dev/null @@ -1,2 +0,0 @@ -.root { -} diff --git a/src/core/client/ui/components/Attachment/Attachment.tsx b/src/core/client/ui/components/Attachment/Attachment.tsx deleted file mode 100644 index 549787707..000000000 --- a/src/core/client/ui/components/Attachment/Attachment.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import React, { CSSProperties } from "react"; -import { Manager, Popper, Reference, RefHandler } from "react-popper"; - -interface RenderProps { - ref: RefHandler; - style?: CSSProperties; -} - -interface InnerProps { - body: React.ReactElement | null; - children: (props: RenderProps) => React.ReactElement; - className?: string; - placement?: - | "auto-start" - | "auto" - | "auto-end" - | "top-start" - | "top" - | "top-end" - | "right-start" - | "right" - | "right-end" - | "bottom-end" - | "bottom" - | "bottom-start" - | "left-end" - | "left" - | "left-start"; -} - -interface Props { - ref: any; - style: CSSProperties; -} - -class Attachment extends React.Component { - public render() { - const { children, body, placement = "top" } = this.props; - return ( - - {(props: Props) => children({ ref: props.ref })} - - {(props: Props) => - body - ? React.cloneElement(body, { - innerRef: props.ref, - style: props.style, - }) - : null - } - - - ); - } -} - -export default Attachment; diff --git a/src/core/client/ui/components/Attachment/index.ts b/src/core/client/ui/components/Attachment/index.ts deleted file mode 100644 index b3b8d5f4a..000000000 --- a/src/core/client/ui/components/Attachment/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./Attachment"; -export { default } from "./Attachment";