|
1 | 1 | import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine'; |
2 | 2 | import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter'; |
3 | 3 | import type { SystemStyleObject } from '@invoke-ai/ui-library'; |
4 | | -import { Button, ButtonGroup, Flex, Spacer } from '@invoke-ai/ui-library'; |
| 4 | +import { Button, Flex, Spacer } from '@invoke-ai/ui-library'; |
5 | 5 | import { useAppSelector } from 'app/store/storeHooks'; |
6 | 6 | import ScrollableContent from 'common/components/OverlayScrollbars/ScrollableContent'; |
7 | 7 | import { firefoxDndFix } from 'features/dnd/util'; |
@@ -35,17 +35,17 @@ export const WorkflowBuilder = memo(() => { |
35 | 35 | return ( |
36 | 36 | <Flex justifyContent="center" w="full" h="full"> |
37 | 37 | <Flex flexDir="column" w="full" maxW="768px" gap={2}> |
38 | | - <ButtonGroup isAttached={false} justifyContent="center" size="sm"> |
| 38 | + <Flex w="full" alignItems="center" gap={2}> |
39 | 39 | <AddFormElementDndButton type="container" /> |
40 | 40 | <AddFormElementDndButton type="divider" /> |
41 | 41 | <AddFormElementDndButton type="heading" /> |
42 | 42 | <AddFormElementDndButton type="text" /> |
43 | | - <Button variant="ghost" tooltip={t('workflows.builder.nodeFieldTooltip')}> |
| 43 | + <Button size="sm" variant="ghost" tooltip={t('workflows.builder.nodeFieldTooltip')}> |
44 | 44 | {t('workflows.builder.nodeField')} |
45 | 45 | </Button> |
46 | 46 | <Spacer /> |
47 | 47 | <WorkflowBuilderEditMenu /> |
48 | | - </ButtonGroup> |
| 48 | + </Flex> |
49 | 49 | <ScrollableContent> |
50 | 50 | <Flex sx={sx} data-is-empty={isFormEmpty}> |
51 | 51 | <FormElementComponent id={rootElementId} /> |
@@ -109,7 +109,16 @@ const AddFormElementDndButton = ({ type }: { type: Parameters<typeof useAddFormE |
109 | 109 | const isDragging = useAddFormElementDnd(type, draggableRef); |
110 | 110 |
|
111 | 111 | return ( |
112 | | - <Button as="div" ref={draggableRef} variant="outline" cursor="grab" borderStyle="dashed" isDisabled={isDragging}> |
| 112 | + // Must be as div for draggable to work correctly |
| 113 | + <Button |
| 114 | + as="div" |
| 115 | + ref={draggableRef} |
| 116 | + variant="outline" |
| 117 | + cursor="grab" |
| 118 | + borderStyle="dashed" |
| 119 | + isDisabled={isDragging} |
| 120 | + size="sm" |
| 121 | + > |
113 | 122 | {startCase(type)} |
114 | 123 | </Button> |
115 | 124 | ); |
|
0 commit comments