index.less 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. @import '~antd/es/style/themes/default.less';
  2. @border: 1px solid @border-color-base;
  3. .radio-card-items {
  4. display: flex;
  5. .radio-card-item {
  6. display: flex;
  7. align-items: center;
  8. min-width: 180px;
  9. padding: 16px 20px;
  10. overflow: hidden;
  11. font-size: 14px;
  12. border: @border;
  13. border-radius: @border-radius-base;
  14. > img {
  15. width: 32px;
  16. height: 32px;
  17. margin-right: 24px;
  18. }
  19. > span {
  20. cursor: default;
  21. }
  22. &:not(:last-child) {
  23. margin-right: 10px;
  24. }
  25. &:hover,
  26. &:focus {
  27. color: @primary-color-hover;
  28. border-color: @primary-color-hover;
  29. }
  30. .checked-icon {
  31. position: absolute;
  32. right: -22px;
  33. bottom: -22px;
  34. z-index: 2;
  35. display: none;
  36. width: 44px;
  37. height: 44px;
  38. color: #fff;
  39. background-color: @primary-color-active;
  40. transform: rotate(-45deg);
  41. > div {
  42. position: relative;
  43. height: 100%;
  44. transform: rotate(45deg);
  45. > span {
  46. position: absolute;
  47. top: 6px;
  48. left: 6px;
  49. font-size: 12px;
  50. }
  51. }
  52. }
  53. &.checked {
  54. position: relative;
  55. color: @primary-color-active;
  56. border-color: @primary-color-active;
  57. > .checked-icon {
  58. display: block;
  59. }
  60. }
  61. }
  62. &.disabled {
  63. .radio-card-item {
  64. color: @disabled-color;
  65. border-color: @disabled-bg;
  66. cursor: not-allowed;
  67. .checked-icon {
  68. background-color: @disabled-active-bg;
  69. }
  70. &:hover,
  71. &:focus {
  72. color: @disabled-color;
  73. border-color: @disabled-active-bg;
  74. }
  75. &.checked {
  76. color: @disabled-color;
  77. border-color: @disabled-active-bg;
  78. }
  79. }
  80. }
  81. }