2022-01-12 09:10:59 +01:00
|
|
|
import { Flex, FlexProps } from '@chakra-ui/react'
|
|
|
|
import { ChoiceItem } from 'models'
|
|
|
|
import React from 'react'
|
|
|
|
|
2022-02-02 08:05:02 +01:00
|
|
|
type Props = {
|
2022-01-12 09:10:59 +01:00
|
|
|
item: ChoiceItem
|
|
|
|
} & FlexProps
|
|
|
|
|
2022-02-02 08:05:02 +01:00
|
|
|
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>
|
|
|
|
)
|
|
|
|
}
|