@bothub-chat/ui
Version:
Bothub UI Components
2 lines (1 loc) • 910 B
JavaScript
import{jsx as t}from"react/jsx-runtime";import{useMemo as e}from"react";import{TooltipArrowStyled as r}from"./styled.js";import"../../../theme/index.js";import{useTheme as a}from"../../../theme/hook.js";const o=({variant:o,inverted:n=!1,placement:s})=>{const i=a(),c=e((()=>{switch(s){case"center-left":return"translateX(-12px) rotate(-90deg)";case"center-right":return"translateX(12px) rotate(90deg)";case"top-left":case"top-right":case"top":return n?"translateY(3px) rotate(180deg)":"";default:return""}}),[s,n]);return t(r,{width:"9",height:"7",viewBox:"0 0 9 7",fill:"none",style:{transform:c},children:t("path",{d:"M3.73201 6.0791C4.13179 6.55848 4.86821 6.55848 5.26799 6.0791L8.7611 1.89047C9.30422 1.2392 8.84112 0.25 7.99311 0.25H1.00689C0.15888 0.25 -0.304218 1.2392 0.2389 1.89046L3.73201 6.0791Z",fill:"primary"===o?i.colors.grayScale.gray2:i.colors.grayScale.gray3})})};export{o as TooltipArrow};