import { HStack, Stack, Text } from '@chakra-ui/react' import { SmartNumberInput } from 'components/shared/SmartNumberInput' import { Input } from 'components/shared/Textbox/Input' import { EmbedBubbleContent } from 'models' import { sanitizeUrl } from 'utils' type Props = { content: EmbedBubbleContent onSubmit: (content: EmbedBubbleContent) => void } export const EmbedUploadContent = ({ content, onSubmit }: Props) => { const handleUrlChange = (url: string) => { const iframeUrl = sanitizeUrl( url.trim().startsWith(' height && onSubmit({ ...content, height }) return ( Works with PDFs, iframes, websites... Height: ) } const extractUrlFromIframe = (iframe: string) => [...iframe.matchAll(/src="([^"]+)"/g)][0][1]