@kiwicom/orbit-components
Version:
Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.
16 lines (14 loc) • 712 B
JavaScript
import { css } from "styled-components";
const tooltipArrowStyle = ({
position,
theme
}) => {
const arrows = {
top: css(["border-width:7px 7px 0 7px;border-color:", " transparent transparent transparent;"], theme.orbit.paletteBlueDark),
right: css(["border-width:7px 7px 7px 0;border-color:transparent ", " transparent transparent;"], theme.orbit.paletteBlueDark),
left: css(["border-width:7px 0 7px 7px;border-color:transparent transparent transparent ", ";"], theme.orbit.paletteBlueDark),
bottom: css(["border-width:0 7px 7px 7px;border-color:transparent transparent ", " transparent;"], theme.orbit.paletteBlueDark)
};
return arrows[position];
};
export default tooltipArrowStyle;