@@ -88,21 +88,21 @@ export default function Home() {
88
88
return (
89
89
< div className = "min-h-screen bg-gray-50" >
90
90
{ /* Header */ }
91
- < header className = "bg-white shadow-sm border-b" >
91
+ < header className = "bg-white shadow-sm border-b border-gray-200 py-6 " >
92
92
< div className = "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8" >
93
- < div className = "flex justify-between items-center h-16 " >
93
+ < div className = "flex flex-col sm:flex-row sm: justify-between sm: items-center space-y-4 sm:space-y-0 " >
94
94
< h1 className = "text-2xl font-bold text-gray-900" > SurveyJS Form Builder</ h1 >
95
- < div className = "flex items-center space -x-4 " >
95
+ < div className = "flex items-center gap -x-6 " >
96
96
< input
97
97
type = "text"
98
98
placeholder = "Enter survey name..."
99
99
value = { currentSurveyName }
100
100
onChange = { ( e ) => setCurrentSurveyName ( e . target . value ) }
101
- className = "px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
101
+ className = "px-5 py-3 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 w-64 "
102
102
/>
103
103
< button
104
104
onClick = { saveSurvey }
105
- className = "px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500"
105
+ className = "px-10 py-5 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 transition "
106
106
>
107
107
Save Survey
108
108
</ button >
@@ -111,47 +111,48 @@ export default function Home() {
111
111
</ div >
112
112
</ header >
113
113
114
- < div className = "flex h-[calc(100vh-4rem )]" >
114
+ < div className = "flex h-[calc(100vh-6rem )]" >
115
115
{ /* Sidebar */ }
116
- < aside className = "w-80 bg-white shadow-sm border-r overflow-y-auto" >
117
- < div className = "p-4 " >
118
- < div className = "flex justify-between items-center mb-4 " >
116
+ < aside className = "w-80 bg-white shadow-sm border-r border-gray-200 overflow-y-auto" >
117
+ < div className = "p-6 " >
118
+ < div className = "flex justify-between items-center mb-12 px-2 " >
119
119
< h2 className = "text-lg font-semibold text-gray-900" > Saved Surveys</ h2 >
120
120
{ savedSurveys . length > 0 && (
121
121
< button
122
122
onClick = { clearAllSurveys }
123
- className = "text-sm text-red-600 hover:text-red-800"
123
+ className = "text-sm text-red-600 hover:text-red-800 transition "
124
124
>
125
125
Clear All
126
126
</ button >
127
127
) }
128
128
</ div >
129
+
129
130
{ savedSurveys . length === 0 ? (
130
131
< p className = "text-gray-500 text-sm" > No saved surveys yet.</ p >
131
132
) : (
132
- < div className = "space-y-2 " >
133
+ < div className = "space-y-6 " >
133
134
{ savedSurveys . map ( ( survey ) => (
134
135
< div
135
136
key = { survey . id }
136
- className = "p-3 border border -gray-200 rounded-lg hover:bg-gray-50 "
137
+ className = "p-5 bg -gray-50 rounded-lg hover:bg-gray-100 transition "
137
138
>
138
- < div className = "flex justify-between items-start" >
139
+ < div className = "flex justify-between items-start gap-6 " >
139
140
< div className = "flex-1" >
140
- < h3 className = "font-medium text-gray-900" > { survey . name } </ h3 >
141
+ < h3 className = "font-medium text-gray-900 mb-2 " > { survey . name } </ h3 >
141
142
< p className = "text-sm text-gray-500" >
142
143
Created: { new Date ( survey . createdAt ) . toLocaleDateString ( ) }
143
144
</ p >
144
145
</ div >
145
- < div className = "flex space-x -2" >
146
+ < div className = "flex gap-4 ml -2" >
146
147
< button
147
148
onClick = { ( ) => loadSurvey ( survey ) }
148
- className = "text-blue-600 hover:text-blue-800 text-sm"
149
+ className = "text-blue-600 hover:text-blue-800 text-sm transition "
149
150
>
150
151
Load
151
152
</ button >
152
153
< button
153
154
onClick = { ( ) => deleteSurvey ( survey . id ) }
154
- className = "text-red-600 hover:text-red-800 text-sm"
155
+ className = "text-red-600 hover:text-red-800 text-sm transition "
155
156
>
156
157
Delete
157
158
</ button >
@@ -165,7 +166,7 @@ export default function Home() {
165
166
</ aside >
166
167
167
168
{ /* Main Content */ }
168
- < main className = "flex-1" >
169
+ < main className = "flex-1 p-8 " >
169
170
< FormBuilderComponent
170
171
onSaveSurvey = { handleSurveyChange }
171
172
json = { surveyJson }
0 commit comments