Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

RichTextComponent.styled.js 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import { Box } from "@mui/material";
  2. import styled, { css } from "styled-components";
  3. import selectedTheme from "../../themes";
  4. export const SlateButtonsContainer = styled(Box)`
  5. display: ${(props) => (props.readOnly ? "none" : "flex")};
  6. flex-direction: row;
  7. height: 36px;
  8. background-color: ${selectedTheme.colors.stylingTextBackground};
  9. padding: 8px 16px;
  10. border-radius: 4px;
  11. gap: 20px;
  12. `;
  13. export const RichTextComponentContainer = styled(Box)`
  14. width: 100%;
  15. position: relative;
  16. top: 14px;
  17. height: ${(props) =>
  18. props?.offerCard || props?.itemDetails ? "auto" : "140px"};
  19. ${(props) =>
  20. props?.offerCard &&
  21. css`
  22. max-height: 100px;
  23. display: -webkit-box;
  24. -webkit-line-clamp: 4;
  25. -webkit-box-orient: vertical;
  26. `}
  27. border-radius: 4px;
  28. border: ${(props) =>
  29. props.readOnly ? "0" : `1px solid ${selectedTheme.colors.borderNormal}`};
  30. margin-bottom: 14px;
  31. @media (max-width: 600px) {
  32. /* height: 40px; */
  33. height: auto;
  34. }
  35. `;
  36. export const EditableContainer = styled(Box)`
  37. ${(props) => !props?.itemDetails && "max-height: 104px;"}
  38. ${(props) => !props?.offerCard && "overflow: auto;"}
  39. &::-webkit-scrollbar {
  40. width: 5px;
  41. height: 5px;
  42. }
  43. &::-webkit-scrollbar-track {
  44. background: #ddd;
  45. }
  46. &::-webkit-scrollbar-thumb {
  47. background: #777;
  48. }
  49. scrollbar-width: thin;
  50. scrollbar-color: #ddd;
  51. @media (max-width: 600px) {
  52. /* max-height: 39px; */
  53. }
  54. `;
  55. export const EditableInnerContainer = styled(Box)`
  56. padding: ${(props) => (props?.readOnly ? "0" : "10px 16px")};
  57. & > div {
  58. min-height: 84px;
  59. }
  60. & * {
  61. font-family: ${selectedTheme.fonts.textFont};
  62. }
  63. & span[data-slate-placeholder="true"] {
  64. font-style: italic;
  65. color: ${selectedTheme.colors.colorPicker.darkGray};
  66. }
  67. @media (max-width: 600px) {
  68. & > div {
  69. min-height: 0;
  70. }
  71. & * {
  72. font-size: 12px;
  73. }
  74. }
  75. `;