Skip to content

Commit eb87b4c

Browse files
Convert example app to use Tailwind CSS
- Install Tailwind CSS v4.1.16 with PostCSS and Autoprefixer - Replace all custom CSS with Tailwind utility classes - Add dark mode support throughout the application - Remove unused CSS files (App.css, SettingsModal.css, ConversationManager.css, ServerStatus.css) - Update components with modern responsive design using Tailwind - Maintain all existing functionality while improving visual consistency Components updated: - App.tsx: Main layout with responsive grid and dark mode - SettingsModal.tsx: Modal overlay with form styling and error states - ConversationManager.tsx: Two-column layout with improved event display - ServerStatus.tsx: Status indicators with color-coded states - index.css: Converted to use Tailwind base styles Co-authored-by: openhands <openhands@all-hands.dev>
1 parent ccf4c9b commit eb87b4c

File tree

13 files changed

+888
-1386
lines changed

13 files changed

+888
-1386
lines changed

example/package-lock.json

Lines changed: 655 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
},
1313
"dependencies": {
1414
"@openhands/agent-server-typescript-client": "file:../",
15+
"@tailwindcss/postcss": "^4.1.16",
1516
"react": "^18.2.0",
1617
"react-dom": "^18.2.0"
1718
},
@@ -21,10 +22,13 @@
2122
"@typescript-eslint/eslint-plugin": "^7.2.0",
2223
"@typescript-eslint/parser": "^7.2.0",
2324
"@vitejs/plugin-react": "^4.2.1",
25+
"autoprefixer": "^10.4.21",
2426
"eslint": "^8.57.0",
2527
"eslint-plugin-react-hooks": "^4.6.0",
2628
"eslint-plugin-react-refresh": "^0.4.6",
29+
"postcss": "^8.5.6",
30+
"tailwindcss": "^4.1.16",
2731
"typescript": "^5.2.2",
2832
"vite": "^5.2.0"
2933
}
30-
}
34+
}

example/postcss.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default {
2+
plugins: {
3+
'@tailwindcss/postcss': {},
4+
autoprefixer: {},
5+
},
6+
}

example/src/App.css

Lines changed: 0 additions & 165 deletions
This file was deleted.

example/src/App.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import './App.css'
2-
31
// Import settings components
42
import { SettingsModal } from './components/SettingsModal'
53
import { ConversationManager } from './components/ConversationManager'
@@ -10,18 +8,21 @@ function App() {
108
const { settings, updateSettings, isModalOpen, openModal, closeModal, isFirstVisit } = useSettings()
119

1210
return (
13-
<div className="App">
14-
<div>
15-
<div className="app-header">
16-
<h1>OpenHands Conversation Manager</h1>
17-
<button className="settings-button" onClick={openModal}>
11+
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 text-gray-900 dark:text-gray-100">
12+
<div className="max-w-7xl mx-auto p-8 text-center">
13+
<div className="flex justify-between items-center mb-8">
14+
<h1 className="text-3xl font-bold text-gray-900 dark:text-white m-0">OpenHands Conversation Manager</h1>
15+
<button
16+
className="bg-indigo-600 hover:bg-indigo-700 text-white px-4 py-3 rounded-md font-medium transition-colors duration-200"
17+
onClick={openModal}
18+
>
1819
⚙️ Settings
1920
</button>
2021
</div>
2122

2223
{isFirstVisit && (
23-
<div className="welcome-message">
24-
<p>👋 Welcome! Please configure your settings to get started.</p>
24+
<div className="bg-blue-50 dark:bg-blue-900/30 border border-blue-200 dark:border-blue-700 rounded-md p-4 mb-4 text-center">
25+
<p className="text-blue-700 dark:text-blue-300 font-medium m-0">👋 Welcome! Please configure your settings to get started.</p>
2526
</div>
2627
)}
2728

0 commit comments

Comments
 (0)