2
0
Files
bot/apps/builder/components/shared/Graph/Nodes/ButtonNode/ButtonNodeOverlay.tsx

27 lines
514 B
TypeScript
Raw Normal View History

2022-01-12 09:10:59 +01:00
import { Flex, FlexProps } from '@chakra-ui/react'
import { ChoiceItem } from 'models'
import React from 'react'
type Props = {
2022-01-12 09:10:59 +01:00
item: ChoiceItem
} & FlexProps
export const ButtonNodeOverlay = ({ item, ...props }: Props) => {
2022-01-12 09:10:59 +01:00
return (
<Flex
px="4"
py="2"
rounded="md"
2022-01-19 09:44:21 +01:00
bgColor="white"
borderWidth="1px"
borderColor={'gray.300'}
2022-01-12 09:10:59 +01:00
w="212px"
pointerEvents="none"
2022-01-19 09:44:21 +01:00
shadow="lg"
2022-01-12 09:10:59 +01:00
{...props}
>
{item.content ?? 'Click to edit'}
</Flex>
)
}