{"size": 2586, "ext": "js", "max_stars_repo_path": "components/atoms/tooltip/tooltip.style.js", "max_stars_repo_name": "EvanMorrison/draft-js-rte", "max_stars_repo_stars_event_min_datetime": "2020-02-06T14:24:39.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-28T17:34:24.000Z", "max_issues_repo_path": "components/atoms/tooltip/tooltip.style.js", "max_issues_repo_name": "Alihussain24/draft-js-rte", "max_issues_repo_issues_event_min_datetime": "2020-09-15T12:56:32.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-17T20:47:46.000Z", "max_forks_repo_path": "components/atoms/tooltip/tooltip.style.js", "max_forks_repo_name": "Alihussain24/draft-js-rte", "max_forks_repo_forks_event_min_datetime": "2020-07-24T19:56:38.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-09T04:23:36.000Z"}
{"max_stars_count": 45, "max_issues_count": 13, "max_forks_count": 15, "avg_line_length": 23.0892857143, "max_line_length": 104, "alphanum_fraction": 0.562258314}
import styled from '@emotion/styled';

export default styled.div`
  &.tooltip {
    border-radius: 5px;
    background-color: ${props => props.theme.colors.pageBackground};
    color: ${props => props.theme.colors.textOnPageBackground};
    border: 2px solid ${props => props.theme.colors.border};
    box-shadow: 2px 2px 14px -7px ${props => props.theme.colors.shadowOnPage};
    z-index: ${props => props.theme.zIndexes.modalOverlayModal + 100};
    padding: 6px 12px;
    white-space: pre-wrap;
    width: max-content;

    &:before,
    &:after {
      content: '';
      position: absolute;
      width: 0;
      height: 0;
      border-style: solid;
    }

    &:before {
      border-width: 12px;
    }

    &:after {
      border-width: 10px;
    }

    &.lg {
      font-size: 14px;
      line-height: 18px;
    }

    &.md {
      font-size: 12px;
      line-height: 14px;
    }

    &.sm {
      font-size: 11px;
      line-height: 12px;
      padding: 4px 8px;

      :before {
        border-width: 8px;
      }
      :after {
        border-width: 6px;
      }
    }

    &.top {
      &:before {
        top: 100%;
        border-color: ${props => props.theme.colors.border} transparent transparent transparent;
        border-bottom-width: 0;
      }

      &:after {
        top: 100%;
        border-color: ${props => props.theme.colors.pageBackground} transparent transparent transparent;
        border-bottom-width: 0;
      }
    }

    &.right {
      &:before {
        right: 100%;
        border-color: transparent ${props => props.theme.colors.border} transparent transparent;
        border-left-width: 0;
      }

      &:after {
        right: 100%;
        border-color: transparent ${props => props.theme.colors.pageBackground} transparent transparent;
        border-left-width: 0;
      }
    }

    &.bottom {
      &:before {
        bottom: 100%;
        border-color: transparent transparent ${props => props.theme.colors.border} transparent;
        border-top-width: 0;
      }

      &:after {
        bottom: 100%;
        border-color: transparent transparent ${props => props.theme.colors.pageBackground} transparent;
        border-top-width: 0;
      }
    }

    &.left {
      &:before {
        left: 100%;
        border-color: transparent transparent transparent ${props => props.theme.colors.border};
        border-right-width: 0;
      }

      &:after {
        left: 100%;
        border-color: transparent transparent transparent ${props => props.theme.colors.pageBackground};
        border-right-width: 0;
      }
    }
  }
`;
