|
| 1 | +export function FlagIcon({ |
| 2 | + region, |
| 3 | + className, |
| 4 | +}: { |
| 5 | + region: "usa" | "europe" | (string & {}); |
| 6 | + className?: string; |
| 7 | +}) { |
| 8 | + switch (region) { |
| 9 | + case "usa": |
| 10 | + return <FlagUSA className={className} />; |
| 11 | + case "europe": |
| 12 | + return <FlagEurope className={className} />; |
| 13 | + default: |
| 14 | + return null; |
| 15 | + } |
| 16 | +} |
| 17 | + |
| 18 | +export function FlagUSA({ className }: { className?: string }) { |
| 19 | + return ( |
| 20 | + <svg className={className} viewBox="0 0 96 72" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| 21 | + <g clipPath="url(#clip0_18908_83688)"> |
| 22 | + <rect x="0.09375" width="95.9062" height="71.9297" rx="5.99414" fill="white" /> |
| 23 | + <path |
| 24 | + fillRule="evenodd" |
| 25 | + clipRule="evenodd" |
| 26 | + d="M0.09375 0V8.0065H96.0937V0H0.09375Z" |
| 27 | + fill="#E31D1C" |
| 28 | + /> |
| 29 | + <path |
| 30 | + fillRule="evenodd" |
| 31 | + clipRule="evenodd" |
| 32 | + d="M0.09375 16.0131V24.0196H96.0937V16.0131H0.09375Z" |
| 33 | + fill="#E31D1C" |
| 34 | + /> |
| 35 | + <path |
| 36 | + fillRule="evenodd" |
| 37 | + clipRule="evenodd" |
| 38 | + d="M0.09375 31.9791V39.9856H96.0937V31.9791H0.09375Z" |
| 39 | + fill="#E31D1C" |
| 40 | + /> |
| 41 | + <path |
| 42 | + fillRule="evenodd" |
| 43 | + clipRule="evenodd" |
| 44 | + d="M0.09375 47.9921V55.9986H96.0937V47.9921H0.09375Z" |
| 45 | + fill="#E31D1C" |
| 46 | + /> |
| 47 | + <path |
| 48 | + fillRule="evenodd" |
| 49 | + clipRule="evenodd" |
| 50 | + d="M0.09375 63.9584V71.9649H96.0937V63.9584H0.09375Z" |
| 51 | + fill="#E31D1C" |
| 52 | + /> |
| 53 | + <rect x="0.09375" width="60" height="40" fill="#2E52B2" /> |
| 54 | + <path |
| 55 | + d="M50.9424 29.8628H53.0938L51.4033 31.5835L52.0576 34.2974L49.9531 32.772L47.7773 34.2974L48.5117 31.5835L46.5791 29.8628H49.1035L49.9502 27.6479L50.9424 29.8628ZM11.3486 29.2515H13.5L11.8096 30.9712L12.4639 33.686L10.3594 32.1606L8.18359 33.686L8.91797 30.9712L6.98633 29.2515H9.50977L10.3564 27.0366L11.3486 29.2515ZM24.5469 29.2515H26.6982L25.0078 30.9712L25.6621 33.686L23.5566 32.1606L21.3818 33.686L22.1162 30.9712L20.1836 29.2515H22.708L23.5537 27.0366L24.5469 29.2515ZM37.7441 29.2515H39.8955L38.2051 30.9712L38.8604 33.686L36.7549 32.1606L34.5791 33.686L35.3135 30.9712L33.3818 29.2515H35.9053L36.752 27.0366L37.7441 29.2515ZM50.9424 18.9077H53.0938L51.4033 20.6284L52.0576 23.3423L49.9521 21.8169L47.7773 23.3423L48.5117 20.6284L46.5791 18.9077H49.1025L49.9492 16.6929L50.9424 18.9077ZM11.3486 18.6021H13.5L11.8096 20.3218L12.4639 23.0366L10.3594 21.5112L8.18359 23.0366L8.91797 20.3218L6.98535 18.6021H9.50977L10.3555 16.3872L11.3486 18.6021ZM24.5459 18.6021H26.6973L25.0068 20.3218L25.6621 23.0366L23.5566 21.5112L21.3809 23.0366L22.1152 20.3218L20.1836 18.6021H22.707L23.5537 16.3872L24.5459 18.6021ZM37.7441 18.6021H39.8955L38.2051 20.3218L38.8594 23.0366L36.7549 21.5112L34.5791 23.0366L35.3135 20.3218L33.3809 18.6021H35.9053L36.752 16.3872L37.7441 18.6021ZM11.3486 7.95264H13.5L11.8096 9.67334L12.4639 12.3872L10.3594 10.8618L8.18359 12.3872L8.91797 9.67334L6.98535 7.95264H9.50977L10.3555 5.73779L11.3486 7.95264ZM24.5459 7.95264H26.6973L25.0068 9.67334L25.6621 12.3872L23.5566 10.8618L21.3809 12.3872L22.1152 9.67334L20.1836 7.95264H22.707L23.5537 5.73779L24.5459 7.95264ZM37.7441 7.95264H39.8955L38.2051 9.67334L38.8594 12.3872L36.7549 10.8618L34.5791 12.3872L35.3135 9.67334L33.3809 7.95264H35.9053L36.752 5.73779L37.7441 7.95264ZM50.9424 7.95264H53.0938L51.4033 9.67334L52.0576 12.3872L49.9521 10.8618L47.7773 12.3872L48.5117 9.67334L46.5791 7.95264H49.1025L49.9492 5.73779L50.9424 7.95264Z" |
| 56 | + fill="white" |
| 57 | + /> |
| 58 | + </g> |
| 59 | + <defs> |
| 60 | + <clipPath id="clip0_18908_83688"> |
| 61 | + <rect x="0.09375" width="95.9062" height="71.9297" rx="5.99414" fill="white" /> |
| 62 | + </clipPath> |
| 63 | + </defs> |
| 64 | + </svg> |
| 65 | + ); |
| 66 | +} |
| 67 | + |
| 68 | +export function FlagEurope({ className }: { className?: string }) { |
| 69 | + return ( |
| 70 | + <svg className={className} viewBox="0 0 96 72" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| 71 | + <rect x="0.09375" width="95.9062" height="71.9297" rx="5.99414" fill="#2E52B2" /> |
| 72 | + <path |
| 73 | + d="M30.1359 9.60876L28.2171 15.508H22.017L27.0358 19.1573L25.1171 25.0565L30.1359 21.4072L35.1547 25.0565L33.236 19.1573L38.2548 15.508H32.0546L30.1359 9.60876Z" |
| 74 | + fill="#F6CD46" |
| 75 | + /> |
| 76 | + <path |
| 77 | + d="M48.0469 2.29382L46.1282 8.19302H39.928L44.9468 11.8424L43.0281 17.7416L48.0469 14.0922L53.0657 17.7416L51.147 11.8424L56.1658 8.19302H49.9656L48.0469 2.29382Z" |
| 78 | + fill="#F6CD46" |
| 79 | + /> |
| 80 | + <path |
| 81 | + d="M65.9577 10.0177L64.039 15.9169H57.8388L62.8576 19.5663L60.9389 25.4655L65.9577 21.8161L70.9766 25.4655L69.0578 19.5663L74.0766 15.9169H67.8765L65.9577 10.0177Z" |
| 82 | + fill="#F6CD46" |
| 83 | + /> |
| 84 | + <path |
| 85 | + d="M73.5861 27.4231L71.6673 33.3223H65.4672L70.486 36.9717L68.5672 42.8709L73.5861 39.2215L78.6049 42.8709L76.6862 36.9717L81.705 33.3223H75.5048L73.5861 27.4231Z" |
| 86 | + fill="#F6CD46" |
| 87 | + /> |
| 88 | + <path |
| 89 | + d="M65.9577 46.0563L64.039 51.9555H57.8388L62.8576 55.6048L60.9389 61.504L65.9577 57.8547L70.9766 61.504L69.0578 55.6048L74.0766 51.9555H67.8765L65.9577 46.0563Z" |
| 90 | + fill="#F6CD46" |
| 91 | + /> |
| 92 | + <path |
| 93 | + d="M48.0469 53.7802L46.1282 59.6794H39.928L44.9468 63.3287L43.0281 69.2279L48.0469 65.5785L53.0657 69.2279L51.147 63.3287L56.1658 59.6794H49.9656L48.0469 53.7802Z" |
| 94 | + fill="#F6CD46" |
| 95 | + /> |
| 96 | + <path |
| 97 | + d="M30.1359 46.0563L28.2171 51.9555H22.017L27.0358 55.6048L25.1171 61.504L30.1359 57.8547L35.1547 61.504L33.236 55.6048L38.2548 51.9555H32.0546L30.1359 46.0563Z" |
| 98 | + fill="#F6CD46" |
| 99 | + /> |
| 100 | + <path |
| 101 | + d="M22.5077 27.4231L20.589 33.3223H14.3888L19.4076 36.9717L17.4889 42.8709L22.5077 39.2215L27.5266 42.8709L25.6078 36.9717L30.6266 33.3223H24.4265L22.5077 27.4231Z" |
| 102 | + fill="#F6CD46" |
| 103 | + /> |
| 104 | + </svg> |
| 105 | + ); |
| 106 | +} |
0 commit comments