@@ -193,6 +193,7 @@ const StatementWizard: React.FC<StatementWizardProps> = ({
193193 const renderObjectStep = ( ) => {
194194 const subQuestion = getSubQuestion ( 'object' ) ;
195195 const nextStep : Step = presetQuestion ? 'privacy' : 'category' ;
196+
196197 return (
197198 < StepContainer subQuestion = { subQuestion } showBack onBack = { handleBack } >
198199 < div className = 'p-4 rounded-md' >
@@ -210,11 +211,12 @@ const StatementWizard: React.FC<StatementWizardProps> = ({
210211 />
211212 </ div >
212213 < Button
213- className = 'w-full mt-4'
214214 onClick = { ( ) => selection . atoms . object . trim ( ) && handleNext ( nextStep ) }
215215 disabled = { ! selection . atoms . object . trim ( ) }
216+ variant = 'pink'
217+ className = 'mx-auto'
216218 >
217- Continue
219+ Next
218220 </ Button >
219221 </ StepContainer >
220222 ) ;
@@ -223,26 +225,60 @@ const StatementWizard: React.FC<StatementWizardProps> = ({
223225 const renderCategoryStep = ( ) => {
224226 const subQuestion = getSubQuestion ( 'category' ) ;
225227 const categories = statementsCategories . categories || [ ] ;
228+ const uncategorisedSelected =
229+ ! selection . category || selection . category === 'uncategorised' ;
230+
226231 return (
227232 < StepContainer subQuestion = { subQuestion } showBack onBack = { handleBack } >
228233 < div className = 'grid grid-cols-2 gap-3 max-h-[60vh] overflow-y-auto p-2' >
229234 { categories . map ( ( cat : { id : string ; name : string } ) => (
230235 < Button
231236 key = { cat . id }
232- variant = { selection . category === cat . id ? 'default' : 'outline' }
233- className = 'h-auto py-4 px-6 text-left flex flex-col items-start space-y-1 transition-all'
234237 onClick = { ( ) =>
235238 setSelection ( ( prev ) => ( { ...prev , category : cat . id } ) )
236239 }
240+ className = { `
241+ h-auto py-4 px-6 text-left flex flex-col items-start transition-all whitespace-normal break-words
242+ ${
243+ selection . category === cat . id
244+ ? 'bg-blue-50 text-blue-600 border-blue-300'
245+ : 'bg-white text-gray-700 border-gray-300'
246+ }
247+ ` }
248+ variant = { selection . category === cat . id ? 'default' : 'outline' }
237249 >
238250 < span className = 'font-medium' > { cat . name } </ span >
239251 </ Button >
240252 ) ) }
253+
254+ { /* Uncategorised button */ }
255+ < Button
256+ onClick = { ( ) =>
257+ setSelection ( ( prev ) => ( { ...prev , category : 'uncategorised' } ) )
258+ }
259+ className = { `
260+ h-auto py-4 px-6 text-left flex flex-col items-start transition-all whitespace-normal break-words
261+ ${
262+ uncategorisedSelected
263+ ? 'bg-blue-50 text-blue-600 border-blue-300'
264+ : 'bg-white text-gray-700 border-gray-300'
265+ }
266+ ` }
267+ variant = { uncategorisedSelected ? 'default' : 'outline' }
268+ >
269+ < span className = 'font-medium' > Uncategorised</ span >
270+ </ Button >
241271 </ div >
272+
242273 < Button
243- onClick = { ( ) => selection . category && handleNext ( 'privacy' ) }
244- disabled = { ! selection . category }
245- className = 'w-full'
274+ onClick = { ( ) => {
275+ if ( ! selection . category ) {
276+ setSelection ( ( prev ) => ( { ...prev , category : 'uncategorised' } ) ) ;
277+ }
278+ handleNext ( 'privacy' ) ;
279+ } }
280+ variant = 'pink'
281+ className = 'mx-auto'
246282 >
247283 Next
248284 </ Button >
0 commit comments