Cube.jsx 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import React from "react";
  2. import { darken } from "color2k";
  3. const Cube = ({ size = 50, color = "#b3b3b3" }) => {
  4. const colorDarken1 = darken(color, 0.2);
  5. const colorDarken2 = darken(color, 0.3);
  6. return (
  7. <svg
  8. xmlns="http://www.w3.org/2000/svg"
  9. version="1.1"
  10. viewBox="0 0 13.229166 13.229167"
  11. height={size}
  12. width={size}
  13. >
  14. <defs id="defs3017">
  15. <filter
  16. height="1.2763327"
  17. y="-0.13816634"
  18. width="1.2236242"
  19. x="-0.11181209"
  20. id="filter2614"
  21. style={{ colorInterpolationFilters: "sRGB" }}
  22. >
  23. <feGaussianBlur id="feGaussianBlur2616" stdDeviation="0.21944301" />
  24. </filter>
  25. </defs>
  26. <g transform="translate(0,-283.77082)" id="layer1">
  27. <g
  28. transform="matrix(1.8603922,0,0,1.8378374,12.807367,313.46089)"
  29. id="g2975"
  30. >
  31. <path
  32. id="path2147"
  33. d="m -5.7289811,-12.428939 0.836726,2.9131116 3.8735272,-0.5076856 -1.057384,-3.304119 z"
  34. style={{
  35. fill: "#000000",
  36. filter: "url(#filter2614)",
  37. opacity: 0.15,
  38. }}
  39. />
  40. <path
  41. fill={color}
  42. d="m -5.4483481,-15.749764 0.836726,3.146974 3.74490418,-0.390756 -0.95214698,-3.140417 z"
  43. id="path2172"
  44. />
  45. <path
  46. id="path2149"
  47. d="m -5.4483481,-15.749764 0.836726,3.146974 -0.067049,2.6117986 -0.770527,-2.5051766 z"
  48. fill={colorDarken1}
  49. />
  50. <path
  51. id="path2151"
  52. d="m -4.6786711,-9.9909914 0.06705,-2.6117986 3.74490418,-0.390756 -0.19995898,2.559471 z"
  53. fill={colorDarken2}
  54. />
  55. </g>
  56. </g>
  57. </svg>
  58. );
  59. };
  60. export default Cube;