(theme) Support for image background

Closes #414
This commit is contained in:
Baptiste Arnaud
2023-03-22 14:45:10 +01:00
parent 1cf2195b4a
commit 3992227afc
6 changed files with 77 additions and 19 deletions

View File

@@ -26,7 +26,7 @@ export const ImageUploadContent = ({
}: Props) => {
const [currentTab, setCurrentTab] = useState<
'link' | 'upload' | 'giphy' | 'emoji'
>(isEmojiEnabled ? 'emoji' : 'upload')
>(isEmojiEnabled ? 'emoji' : 'link')
const handleSubmit = (url: string) => {
onSubmit(url)
@@ -45,13 +45,6 @@ export const ImageUploadContent = ({
Emoji
</Button>
)}
<Button
variant={currentTab === 'upload' ? 'solid' : 'ghost'}
onClick={() => setCurrentTab('upload')}
size="sm"
>
Upload
</Button>
<Button
variant={currentTab === 'link' ? 'solid' : 'ghost'}
onClick={() => setCurrentTab('link')}
@@ -59,6 +52,13 @@ export const ImageUploadContent = ({
>
Embed link
</Button>
<Button
variant={currentTab === 'upload' ? 'solid' : 'ghost'}
onClick={() => setCurrentTab('upload')}
size="sm"
>
Upload
</Button>
{isGiphyEnabled && (
<Button
variant={currentTab === 'giphy' ? 'solid' : 'ghost'}