Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
fix(Tooltip): Add Tooltip.css (rename from tooltip.css)
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg-Hamel committed May 25, 2018
1 parent df92785 commit a6c36ae
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 9 additions & 0 deletions src/components/Tooltip/Tooltip.css
@@ -0,0 +1,9 @@
/* Tooltip-specific Stylesheet */

.tbr-arrow-vertical {
left: calc(50% - 0.4rem);
}

.tbr-arrow-horizontal {
top: calc(50% - 0.4rem);
}
8 changes: 4 additions & 4 deletions src/components/Tooltip/Tooltip.react.js
Expand Up @@ -4,7 +4,7 @@ import * as React from "react";
import cn from "classnames";
import { Manager, Placement, Reference, Popper } from "react-popper";
import type { PopperChildrenProps, ReferenceChildrenProps } from "react-popper";
// import styles from "./Tooltip.css";
import styles from "./Tooltip.css";

type Props = {|
+content: string,
Expand Down Expand Up @@ -44,9 +44,9 @@ class Tooltip extends React.Component<Props, State> {

const arrowClasses = cn(
"arrow"
// placement === "top" || placement === "bottom"
// ? styles["tbr-arrow-vertical"]
// : styles["tbr-arrow-horizontal"]
placement === "top" || placement === "bottom"
? styles["tbr-arrow-vertical"]
: styles["tbr-arrow-horizontal"]
);

return (
Expand Down

0 comments on commit a6c36ae

Please sign in to comment.