Add recent section in icon and emoji picker

Closes #536
This commit is contained in:
Baptiste Arnaud
2023-06-20 14:04:33 +02:00
parent 36623930bc
commit eaadc59b1f
12 changed files with 161 additions and 87 deletions

View File

@@ -87,6 +87,7 @@ export const AvatarForm = ({
p="4"
onMouseDown={(e) => e.stopPropagation()}
onPointerDown={(e) => e.stopPropagation()}
w="500px"
>
<ImageUploadContent
filePath={uploadFilePath}

View File

@@ -8,6 +8,7 @@ import {
Text,
Image,
Button,
Portal,
} from '@chakra-ui/react'
import { isNotEmpty } from '@typebot.io/lib'
import { Background, BackgroundType } from '@typebot.io/schemas'
@@ -57,14 +58,16 @@ export const BackgroundContent = ({
<Button>Select an image</Button>
)}
</PopoverTrigger>
<PopoverContent p="4">
<ImageUploadContent
filePath={`typebots/${typebot?.id}/background`}
defaultUrl={background.content}
onSubmit={handleContentChange}
excludedTabs={['giphy', 'icon']}
/>
</PopoverContent>
<Portal>
<PopoverContent p="4" w="500px">
<ImageUploadContent
filePath={`typebots/${typebot?.id}/background`}
defaultUrl={background.content}
onSubmit={handleContentChange}
excludedTabs={['giphy', 'icon']}
/>
</PopoverContent>
</Portal>
</Popover>
)
default: