File tree Expand file tree Collapse file tree 2 files changed +18
-31
lines changed
FormBuilder/fields/selects Expand file tree Collapse file tree 2 files changed +18
-31
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,9 @@ export const ColorPickerField = withConditional<ColorPickerFieldProps>(
8989 colorPickerVariants ( field . style )
9090 ) }
9191 >
92- { formField . value && < span className = "ml-3" > #</ span > }
92+ < span className = { cn ( "ml-3" , ! formField . value && "invisible" ) } >
93+ #
94+ </ span >
9395 < input
9496 type = "text"
9597 className = "p-2 mx-0 flex-1 border-0 border-transparent bg-transparent file:border-0 file:bg-transparent file:text-sm file:font-medium focus:border-transparent focus:ring-0"
@@ -103,7 +105,7 @@ export const ColorPickerField = withConditional<ColorPickerFieldProps>(
103105 < Popover >
104106 < PopoverTrigger asChild >
105107 < div
106- className = "mr-2 size-7 rounded-full border shadow-lg"
108+ className = "mr-2 h-7 w-7 shrink-0 rounded-full border shadow-lg"
107109 style = { { background : formField . value ?? "#aabbcc" } }
108110 />
109111 </ PopoverTrigger >
Original file line number Diff line number Diff line change @@ -121,40 +121,25 @@ export const TaggablePopover = ({
121121 < Button
122122 variant = "outline"
123123 size = "sm"
124- className = "my-4 h-8 border-dashed dark:border-2"
124+ className = "my-4 h-auto min-h- 8 border-dashed dark:border-2"
125125 >
126- < PlusCircledIcon className = "mr-2 h-4 w-4" />
126+ < PlusCircledIcon className = "mr-2 h-4 w-4 shrink-0 " />
127127 Tags
128128 { selectedTags ?. length > 0 && (
129129 < >
130130 < Separator orientation = "vertical" className = "mx-2 h-4" />
131- < Badge
132- color = "secondary"
133- className = "rounded-sm px-1 font-normal lg:hidden"
134- >
135- { selectedTags . length }
136- </ Badge >
137- < div className = "hidden space-x-1 lg:flex" >
138- { selectedTags . length > 2 ? (
139- < Badge
140- color = "secondary"
141- className = "rounded-sm px-1 font-normal"
142- >
143- { selectedTags . length } tags
144- </ Badge >
145- ) : (
146- tags
147- . filter ( ( option ) => selectedTags . includes ( option . value ) )
148- . map ( ( option ) => (
149- < Badge
150- color = "secondary"
151- key = { option . value }
152- className = "rounded-sm px-1 font-normal"
153- >
154- { option . label }
155- </ Badge >
156- ) )
157- ) }
131+ < div className = "flex max-w-xs flex-wrap gap-1 py-4" >
132+ { tags
133+ . filter ( ( option ) => selectedTags . includes ( option . value ) )
134+ . map ( ( option ) => (
135+ < Badge
136+ color = "secondary"
137+ key = { option . value }
138+ className = "rounded-sm px-1 font-normal"
139+ >
140+ { option . label }
141+ </ Badge >
142+ ) ) }
158143 </ div >
159144 </ >
160145 ) }
You can’t perform that action at this time.
0 commit comments