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.

DropdownList.styled.js 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. font-family: "Open Sans";
  21. color: ${(props) =>
  22. props.disabled
  23. ? selectedTheme.iconStrokeDisabledColor
  24. : props.textcolor
  25. ? props.textcolor
  26. : selectedTheme.primaryText};
  27. `;
  28. export const ToggleIconOpened = styled(IconButton)`
  29. cursor: pointer;
  30. color: ${selectedTheme.primaryPurple};
  31. & span {
  32. ${(props) =>
  33. props.backgroundColor ? `background-color: ${props.backgroundColor}` : ``}
  34. }
  35. `;
  36. export const ToggleIconClosed = styled(IconButton)`
  37. cursor: pointer;
  38. color: ${selectedTheme.primaryPurple};
  39. &:hover button {
  40. ${(props) =>
  41. props.disabled &&
  42. `background-color: ${selectedTheme.primaryIconBackgroundColor}`}
  43. }
  44. & span {
  45. ${(props) =>
  46. props.backgroundColor || !props.disabled
  47. ? `background-color: ${props.backgroundColor}`
  48. : ``}
  49. }
  50. & svg path {
  51. ${(props) =>
  52. props.disabled &&
  53. `
  54. stroke: ${selectedTheme.iconStrokeDisabledColor};
  55. `}
  56. }
  57. `;
  58. export const DropdownIcon = styled(IconButton)`
  59. font-size: 22px !important;
  60. & svg {
  61. font-size: 22px;
  62. & path {
  63. ${(props) =>
  64. props.disabled &&
  65. `
  66. stroke: ${selectedTheme.iconStrokeDisabledColor};
  67. `}
  68. }
  69. }
  70. `;
  71. export const ListContainer = styled(Box)`
  72. padding-left: 15px;
  73. margin-left: 15px;
  74. `;
  75. export const DropdownHeader = styled(Box)`
  76. display: flex;
  77. flex-direction: row;
  78. `;
  79. export const DropdownOptions = styled(Box)``;
  80. export const ToggleContainer = styled(Box)`
  81. display: ${(props) => (props.shouldShow ? "block" : "none")};
  82. `;