diff --git a/apps/builder/src/features/publish/components/embeds/EmbedButton.tsx b/apps/builder/src/features/publish/components/embeds/EmbedButton.tsx index 6e0f8862e..5261b7cce 100644 --- a/apps/builder/src/features/publish/components/embeds/EmbedButton.tsx +++ b/apps/builder/src/features/publish/components/embeds/EmbedButton.tsx @@ -47,6 +47,8 @@ import { useWorkspace } from '@/features/workspace/WorkspaceProvider' import { hasProPerks } from '@/features/billing/helpers/hasProPerks' import { LockTag } from '@/features/billing/components/LockTag' import { Plan } from '@typebot.io/prisma' +import { FramerModal } from './modals/FramerModal' +import { FramerLogo } from './logos/FramerLogo' export type ModalProps = { publicId: string @@ -210,6 +212,14 @@ export const integrationsList = [ {...props} /> ), + (props: Pick) => ( + } + label="Framer" + modal={(modalProps) => } + {...props} + /> + ), (props: Pick) => ( ( + + + +) diff --git a/apps/builder/src/features/publish/components/embeds/modals/FramerModal/FramerModal.tsx b/apps/builder/src/features/publish/components/embeds/modals/FramerModal/FramerModal.tsx new file mode 100644 index 000000000..a19ba16b6 --- /dev/null +++ b/apps/builder/src/features/publish/components/embeds/modals/FramerModal/FramerModal.tsx @@ -0,0 +1,26 @@ +import React, { useState } from 'react' +import { ModalProps } from '../../EmbedButton' +import { EmbedModal } from '../../EmbedModal' +import { isDefined } from '@udecode/plate-common' +import { FramerInstructions } from './instructions/FramerInstructions' + +export const FramerModal = ({ isOpen, onClose, isPublished }: ModalProps) => { + const [selectedEmbedType, setSelectedEmbedType] = useState< + 'standard' | 'popup' | 'bubble' | undefined + >() + + return ( + + {isDefined(selectedEmbedType) && ( + + )} + + ) +} diff --git a/apps/builder/src/features/publish/components/embeds/modals/FramerModal/index.ts b/apps/builder/src/features/publish/components/embeds/modals/FramerModal/index.ts new file mode 100644 index 000000000..ff1551dfe --- /dev/null +++ b/apps/builder/src/features/publish/components/embeds/modals/FramerModal/index.ts @@ -0,0 +1 @@ +export * from './FramerModal' diff --git a/apps/builder/src/features/publish/components/embeds/modals/FramerModal/instructions/FramerBubbleInstructions.tsx b/apps/builder/src/features/publish/components/embeds/modals/FramerModal/instructions/FramerBubbleInstructions.tsx new file mode 100644 index 000000000..fa1ddd37c --- /dev/null +++ b/apps/builder/src/features/publish/components/embeds/modals/FramerModal/instructions/FramerBubbleInstructions.tsx @@ -0,0 +1,63 @@ +import { useTypebot } from '@/features/editor/providers/TypebotProvider' +import { OrderedList, ListItem, Code, Stack, Text } from '@chakra-ui/react' +import { BubbleProps } from '@typebot.io/nextjs' +import { useState } from 'react' +import { BubbleSettings } from '../../../settings/BubbleSettings/BubbleSettings' +import { parseDefaultBubbleTheme } from '../../Javascript/instructions/JavascriptBubbleInstructions' +import { JavascriptBubbleSnippet } from '../../Javascript/JavascriptBubbleSnippet' +import { TextLink } from '@/components/TextLink' + +export const FramerBubbleInstructions = () => { + const { typebot } = useTypebot() + + const [theme, setTheme] = useState( + parseDefaultBubbleTheme(typebot) + ) + const [previewMessage, setPreviewMessage] = + useState() + + return ( + <> + + + Head over to the Site Settings {'>'} General{' '} + {'>'} Custom Code section + + + + + + Paste this in the{' '} + + End of {'<'}body{'>'} tag + {' '} + input: + + + + + + + Check out the{' '} + + Custom Code Framer doc + {' '} + for more information. + + + ) +} diff --git a/apps/builder/src/features/publish/components/embeds/modals/FramerModal/instructions/FramerInstructions.tsx b/apps/builder/src/features/publish/components/embeds/modals/FramerModal/instructions/FramerInstructions.tsx new file mode 100644 index 000000000..6f4295ff0 --- /dev/null +++ b/apps/builder/src/features/publish/components/embeds/modals/FramerModal/instructions/FramerInstructions.tsx @@ -0,0 +1,21 @@ +import { FramerBubbleInstructions } from './FramerBubbleInstructions' +import { FramerPopupInstructions } from './FramerPopupInstructions' +import { FramerStandardInstructions } from './FramerStandardInstructions' + +type Props = { + type: 'standard' | 'popup' | 'bubble' +} + +export const FramerInstructions = ({ type }: Props) => { + switch (type) { + case 'standard': { + return + } + case 'popup': { + return + } + case 'bubble': { + return + } + } +} diff --git a/apps/builder/src/features/publish/components/embeds/modals/FramerModal/instructions/FramerPopupInstructions.tsx b/apps/builder/src/features/publish/components/embeds/modals/FramerModal/instructions/FramerPopupInstructions.tsx new file mode 100644 index 000000000..232f29e6b --- /dev/null +++ b/apps/builder/src/features/publish/components/embeds/modals/FramerModal/instructions/FramerPopupInstructions.tsx @@ -0,0 +1,47 @@ +import { OrderedList, ListItem, Code, Stack, Text } from '@chakra-ui/react' +import { useState } from 'react' +import { PopupSettings } from '../../../settings/PopupSettings' +import { JavascriptPopupSnippet } from '../../Javascript/JavascriptPopupSnippet' +import { TextLink } from '@/components/TextLink' + +export const FramerPopupInstructions = () => { + const [inputValue, setInputValue] = useState() + + return ( + <> + + + Head over to the Site Settings {'>'} General{' '} + {'>'} Custom Code section + + + + + setInputValue(settings.autoShowDelay) + } + /> + + Paste this in the{' '} + + End of {'<'}body{'>'} tag + {' '} + input: + + + + + + + Check out the{' '} + + Custom Code Framer doc + {' '} + for more information. + + + ) +} diff --git a/apps/builder/src/features/publish/components/embeds/modals/FramerModal/instructions/FramerStandardInstructions.tsx b/apps/builder/src/features/publish/components/embeds/modals/FramerModal/instructions/FramerStandardInstructions.tsx new file mode 100644 index 000000000..c41b05209 --- /dev/null +++ b/apps/builder/src/features/publish/components/embeds/modals/FramerModal/instructions/FramerStandardInstructions.tsx @@ -0,0 +1,19 @@ +import { OrderedList, ListItem, Code, Stack, Text } from '@chakra-ui/react' +import { JavascriptStandardSnippet } from '../../Javascript/JavascriptStandardSnippet' + +export const FramerStandardInstructions = () => ( + + + Press A to open the Add elements panel + + + + + Add an Embed element from the components{' '} + section and paste this code: + + + + + +)