Skip to content

Commit

Permalink
🛂 Temporarily disable Make.com
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Apr 30, 2022
1 parent 7b4dc47 commit cff5ec6
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 29 deletions.
61 changes: 33 additions & 28 deletions apps/builder/components/editor/StepsSideBar/StepCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Flex, HStack, StackProps, Text } from '@chakra-ui/react'
import { Flex, HStack, StackProps, Text, Tooltip } from '@chakra-ui/react'
import { StepType, DraggableStepType } from 'models'
import { useStepDnd } from 'contexts/GraphDndContext'
import React, { useEffect, useState } from 'react'
Expand All @@ -8,8 +8,10 @@ import { StepTypeLabel } from './StepTypeLabel'
export const StepCard = ({
type,
onMouseDown,
isDisabled = false,
}: {
type: DraggableStepType
isDisabled?: boolean
onMouseDown: (e: React.MouseEvent, type: DraggableStepType) => void
}) => {
const { draggedStepType } = useStepDnd()
Expand All @@ -22,33 +24,36 @@ export const StepCard = ({
const handleMouseDown = (e: React.MouseEvent) => onMouseDown(e, type)

return (
<Flex pos="relative">
<HStack
borderWidth="1px"
borderColor="gray.200"
rounded="lg"
flex="1"
cursor={'grab'}
opacity={isMouseDown ? '0.4' : '1'}
onMouseDown={handleMouseDown}
bgColor="gray.50"
px="4"
py="2"
_hover={{ shadow: 'md' }}
transition="box-shadow 200ms"
>
{!isMouseDown ? (
<>
<StepIcon type={type} />
<StepTypeLabel type={type} />
</>
) : (
<Text color="white" userSelect="none">
Placeholder
</Text>
)}
</HStack>
</Flex>
<Tooltip label="Coming soon!" isDisabled={!isDisabled}>
<Flex pos="relative">
<HStack
borderWidth="1px"
borderColor="gray.200"
rounded="lg"
flex="1"
cursor={'grab'}
opacity={isMouseDown || isDisabled ? '0.4' : '1'}
onMouseDown={handleMouseDown}
bgColor="gray.50"
px="4"
py="2"
_hover={{ shadow: 'md' }}
transition="box-shadow 200ms"
pointerEvents={isDisabled ? 'none' : 'auto'}
>
{!isMouseDown ? (
<>
<StepIcon type={type} />
<StepTypeLabel type={type} />
</>
) : (
<Text color="white" userSelect="none">
Placeholder
</Text>
)}
</HStack>
</Flex>
</Tooltip>
)
}

Expand Down
7 changes: 6 additions & 1 deletion apps/builder/components/editor/StepsSideBar/StepSideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,12 @@ export const StepsSideBar = () => {
</Text>
<SimpleGrid columns={2} spacing="3">
{Object.values(IntegrationStepType).map((type) => (
<StepCard key={type} type={type} onMouseDown={handleMouseDown} />
<StepCard
key={type}
type={type}
onMouseDown={handleMouseDown}
isDisabled={type === IntegrationStepType.MAKE_COM}
/>
))}
</SimpleGrid>
</Stack>
Expand Down

4 comments on commit cff5ec6

@vercel
Copy link

@vercel vercel bot commented on cff5ec6 Apr 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

builder-v2 – ./apps/builder

builder-v2-typebot-io.vercel.app
builder-v2-git-main-typebot-io.vercel.app
app.typebot.io

@vercel
Copy link

@vercel vercel bot commented on cff5ec6 Apr 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on cff5ec6 Apr 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.