mentionStyle.tsx 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import space from 'sentry/styles/space';
  2. /**
  3. * Note this is an object for `react-mentions` component and
  4. * not a styled component/emotion style
  5. */
  6. export default function mentionStyle({theme, minHeight}) {
  7. return {
  8. control: {
  9. backgroundColor: `${theme.background}`,
  10. fontSize: 15,
  11. fontWeight: 'normal',
  12. },
  13. input: {
  14. margin: 0,
  15. },
  16. '&singleLine': {
  17. control: {
  18. display: 'inline-block',
  19. width: 130,
  20. },
  21. highlighter: {
  22. padding: 1,
  23. border: '2px inset transparent',
  24. },
  25. input: {
  26. padding: 1,
  27. border: '2px inset',
  28. },
  29. },
  30. '&multiLine': {
  31. control: {
  32. fontFamily: 'Rubik, Avenir Next, Helvetica Neue, sans-serif',
  33. minHeight,
  34. },
  35. highlighter: {
  36. padding: 20,
  37. minHeight,
  38. },
  39. input: {
  40. padding: `${space(1.5)} ${space(2)} 0`,
  41. minHeight,
  42. overflow: 'auto',
  43. outline: 0,
  44. border: 0,
  45. },
  46. },
  47. suggestions: {
  48. list: {
  49. maxHeight: 150,
  50. overflow: 'auto',
  51. backgroundColor: `${theme.background}`,
  52. border: '1px solid rgba(0,0,0,0.15)',
  53. fontSize: 12,
  54. },
  55. item: {
  56. padding: '5px 15px',
  57. borderBottom: '1px solid rgba(0,0,0,0.15)',
  58. '&focused': {
  59. backgroundColor: `${theme.backgroundSecondary}`,
  60. },
  61. },
  62. },
  63. };
  64. }