@@ -120,12 +120,15 @@ export const makeShadcnAutoHasManyForm = ({
120
120
>
121
121
< AccordionTrigger onClick = { ( e ) => e . preventDefault ( ) } >
122
122
{ option . label ? (
123
- < div className = "flex justify-between" >
124
- < div className = "flex flex-col gap-2 " >
125
- { renderOptionLabel ( option . label , "primary" ) }
123
+ < div className = "flex justify-between w-full items-center " >
124
+ < div className = "flex flex-col gap-1 items-start " >
125
+ { option . label && renderOptionLabel ( option . label , "primary" ) }
126
126
{ option . secondaryLabel && renderOptionLabel ( option . secondaryLabel , "secondary" ) }
127
127
</ div >
128
- { option . tertiaryLabel && renderOptionLabel ( option . tertiaryLabel , "tertiary" ) }
128
+
129
+ { option . tertiaryLabel && (
130
+ < div className = "flex items-center" > { renderOptionLabel ( option . tertiaryLabel , "tertiary" ) } </ div >
131
+ ) }
129
132
</ div >
130
133
) : (
131
134
< Label > Click to edit...</ Label >
@@ -146,20 +149,18 @@ export const makeShadcnAutoHasManyForm = ({
146
149
) ;
147
150
} ) }
148
151
</ Accordion >
149
- < div >
150
- < Button
151
- type = "button"
152
- variant = "default"
153
- className = "flex gap-1 border border-gray-300 rounded-md p-2 cursor-pointer"
154
- onClick = { ( ) => {
155
- append ( { } ) ;
156
- setEditingIndex ( fields . length ) ;
157
- } }
158
- >
159
- < PlusCircleIcon className = "w-4 h-4" />
160
- < Label className = "text-sm font-semibold" > Add { modelName } </ Label >
161
- </ Button >
162
- </ div >
152
+ < Button
153
+ type = "button"
154
+ variant = "default"
155
+ className = "flex gap-1 border border-gray-300 rounded-md p-2 cursor-pointer"
156
+ onClick = { ( ) => {
157
+ append ( { } ) ;
158
+ setEditingIndex ( fields . length ) ;
159
+ } }
160
+ >
161
+ < PlusCircleIcon className = "w-4 h-4" />
162
+ < Label className = "text-sm font-semibold" > Add { modelName } </ Label >
163
+ </ Button >
163
164
</ div >
164
165
</ div >
165
166
) ;
0 commit comments