Message.style.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. import styled from "styled-components";
  2. export const MessageWrapper = styled.div`
  3. display: flex;
  4. margin: 3px;
  5. `;
  6. export const MessageContainer = styled.div`
  7. color: #000;
  8. max-width: 400px;
  9. background-color: ${props => props.isOwner ? '#E2DCC2' : '#CCCCCC'};
  10. padding: 12px 16px 8px;
  11. position: relative;
  12. display: block;
  13. border-radius: 5px 5px 5px 0px;
  14. &::before{
  15. content: '';
  16. width: 15px;
  17. height: 15px;
  18. position: absolute;
  19. background-color: ${props => props.isOwner ? '#E2DCC2' : '#CCCCCC'};
  20. bottom: 0;
  21. left: -14px;
  22. clip-path: polygon(75% 63%, 83% 53%, 90% 41%, 94% 31%, 98% 15%, 100% 0, 100% 100%, 22% 100%, 34% 94%, 43% 88%, 55% 80%, 65% 72%);
  23. };
  24. ${props => props.lastElem ? `
  25. border-radius: 5px 5px 5px 5px;
  26. &::before{
  27. display: none;
  28. }
  29. ` : ` border-radius: 5px 5px 5px 5px
  30. &::before{
  31. } `
  32. }
  33. `;
  34. export const MessageText = styled.div`
  35. width: 100%;
  36. text-align: left;
  37. word-wrap: break-word;
  38. font-size: 14px;
  39. line-height: 1.4;
  40. `;
  41. export const TimeMessage = styled.span`
  42. color: #a1a1a1;
  43. font-size: 13px;
  44. `;
  45. export const MessageFooter = styled.div`
  46. display: flex;
  47. justify-content: space-between;
  48. margin-top: 5px;
  49. `;
  50. export const MessageOwner = styled.div`
  51. color: #a1a1a1;
  52. font-size: 13px;
  53. margin-right: 30px;
  54. `;
  55. export const ForwardedMessageHeader = styled.div`
  56. color: ${props => props.owner ? '#E67E22' : '#3498DB'};
  57. font-size: 14px;
  58. font-weight: 500;
  59. line-height: 1;
  60. `;