Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

DropdownList.styled.js 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. import { Box, Typography } from "@mui/material";
  2. import styled from "styled-components";
  3. import selectedTheme from "../../../themes";
  4. import { IconButton } from "../../Buttons/IconButton/IconButton";
  5. export const DropdownListContainer = styled(Box)`
  6. width: ${(props) =>
  7. props.fullwidth ? "100%" : props.width ? props.width : "250px"};
  8. padding: 8px 0;
  9. `;
  10. export const DropdownTitle = styled(Typography)`
  11. display: flex;
  12. flex: 1;
  13. cursor: pointer;
  14. padding-left: 9px;
  15. font-size: 16px;
  16. font-weight: 400;
  17. padding-bottom: 10px;
  18. padding-top: 5px;
  19. padding-right: 0.9rem;
  20. width: 185px;
  21. margin-right: 15px;
  22. max-width: 185px;
  23. overflow: hidden;
  24. white-space: nowrap;
  25. display: inline-block;
  26. text-overflow: ellipsis;
  27. max-height: 26px;
  28. font-family: ${selectedTheme.fonts.textFont};
  29. color: ${(props) =>
  30. props.disabled
  31. ? selectedTheme.colors.iconStrokeDisabledColor
  32. : props.textcolor
  33. ? props.textcolor
  34. : selectedTheme.coloros.primaryText};
  35. @media (max-width: 600px) {
  36. font-size: 14px;
  37. }
  38. `;
  39. export const ToggleIconOpened = styled(IconButton)`
  40. cursor: pointer;
  41. color: ${selectedTheme.colors.primaryPurple};
  42. & span {
  43. ${(props) =>
  44. props.backgroundColor ? `background-color: ${props.backgroundColor}` : ``}
  45. }
  46. `;
  47. export const ToggleIconClosed = styled(IconButton)`
  48. cursor: pointer;
  49. color: ${selectedTheme.colors.primaryPurple};
  50. &:hover button {
  51. ${(props) =>
  52. props.disabled &&
  53. `background-color: ${selectedTheme.colors.primaryIconBackgroundColor}`}
  54. }
  55. & span {
  56. ${(props) =>
  57. props.backgroundColor || !props.disabled
  58. ? `background-color: ${props.backgroundColor}`
  59. : ``}
  60. }
  61. & svg path {
  62. ${(props) =>
  63. props.disabled &&
  64. `
  65. stroke: ${selectedTheme.colors.iconStrokeDisabledColor};
  66. `}
  67. }
  68. `;
  69. export const DropdownIcon = styled(IconButton)`
  70. font-size: 22px !important;
  71. & svg {
  72. font-size: 22px;
  73. & path {
  74. ${(props) =>
  75. props.disabled &&
  76. `
  77. stroke: ${selectedTheme.colors.iconStrokeDisabledColor};
  78. `}
  79. }
  80. }
  81. `;
  82. export const ListContainer = styled(Box)`
  83. padding-left: 15px;
  84. margin-left: 15px;
  85. `;
  86. export const DropdownHeader = styled(Box)`
  87. display: flex;
  88. flex-direction: row;
  89. `;
  90. export const DropdownOptions = styled(Box)``;
  91. export const ToggleContainer = styled(Box)`
  92. display: ${(props) => (props.shouldShow ? "block" : "none")};
  93. `;