All files / src/features/GiveConversation/components ChatStyledTexts.tsx

100% Statements 6/6
50% Branches 2/4
100% Functions 4/4
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29        6x 30x 4x                       6x 60x 9x                
import GiveText from "@shared/Text/GiveText";
import { styled } from "@theme/v2/Provider";
import { ChatTextAtomProps } from "../types";
 
export const ChatMentionedText = styled(GiveText, {
  shouldForwardProp: (prop) => prop !== "isLoggedInUser",
})<ChatTextAtomProps>(({ theme, isLoggedInUser }) => ({
  display: "inline",
  padding: "1px 4px",
  borderRadius: "34px",
  backgroundColor: theme.palette.surface?.primary,
  color: isLoggedInUser
    ? theme.palette?.primitive?.blue?.[100]
    : theme?.palette?.primitive?.warning?.[50],
  marginRight: "2px",
  whiteSpace: "nowrap",
}));
 
export const ChatSearchMatchText = styled(GiveText, {
  shouldForwardProp: (prop) => prop !== "isLoggedInUser",
})<ChatTextAtomProps>(({ theme, isLoggedInUser }) => ({
  py: "3px",
  px: "1px",
  borderRadius: "4px",
  backgroundColor: isLoggedInUser
    ? theme.palette.primitive?.warning[100]
    : theme?.palette?.primitive?.warning?.[25],
}));