FlagsTable.tsx 865 B

123456789101112131415161718192021222324252627282930313233343536
  1. import { flags } from '@/config/tabler';
  2. import { uiCdnUrl } from '@/config/site';
  3. type Flag = {
  4. flag: string
  5. name: string
  6. }
  7. export default function FlagsTable () {
  8. return (
  9. <table className="table">
  10. <tbody>
  11. {flags.map((flag: Flag) => (
  12. <tr key={flag.flag}>
  13. <td>
  14. <img
  15. src={`${uiCdnUrl}/dist/img/flags/${flag.flag}.svg`}
  16. height="40"
  17. alt={flag.name}
  18. className="rounded border"
  19. />
  20. </td>
  21. <td className="d-none lg:d-table-cell">{flag.name}</td>
  22. <td>
  23. <code>{flag.flag}</code>
  24. </td>
  25. <td className="d-none lg:d-table-cell">
  26. <code>.flag-country-{flag.flag}</code>
  27. </td>
  28. </tr>
  29. ))}
  30. </tbody>
  31. </table>
  32. );
  33. }