Back to blocks

按钮跳转与阿拉伯语支持

4.0
en网页开发按钮功能阿拉伯语网页优化

Промпт

Make each button take me to the page I clicked on and add the Arabic language

Сгенерированный Результат

import React from 'react';

function App() {
  const handleClick = (page) => {
    window.location.href = page;
  };

  return (
    <div className="min-h-screen bg-gray-100 flex flex-col items-center justify-center">
      <h1 className="text-4xl font-bold text-gray-800 mb-8">مرحبًا بك في تطبيقنا</h1>
      <div className="flex space-x-4">
        <button
          onClick={() => handleClick('/page1')}
          className="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"
        >
          الصفحة 1
        </button>
        <button
          onClick={() => handleClick('/page2')}
          className="bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded"
        >
          الصفحة 2
        </button>
        <button
          onClick={() => handleClick('/page3')}
          className="bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded"
        >
          الصفحة 3
        </button>
      </div>
      <footer className="mt-8 text-gray-600">
        © 2025 جميع الحقوق محفوظة
      </footer>
    </div>
  );
}

export default App;

Больше Рекомендаций

Посмотреть Все