diff --git a/src/components/collapsible/index.tsx b/src/components/collapsible/index.tsx index 9dfaa43..80d5977 100644 --- a/src/components/collapsible/index.tsx +++ b/src/components/collapsible/index.tsx @@ -1,7 +1,8 @@ import React from "react"; import { useState, useRef } from "react"; -import './collapsible.css'; +import "./collapsible.css"; import { FaAngleDown, FaAngleUp } from "react-icons/fa"; +import { Collapse } from "react-bootstrap"; //This is collapsible component, use it as if you are using any pre-designed component //Specify the Style of collapsible component as if you were styling a div using style prompt @@ -49,8 +50,8 @@ const Collapsible = (props: PropTypes) => { style={{ height: isOpen ? `fit-content` : '0px' }}>
{description}
+ ); }; diff --git a/src/components/dashboard/ProviderGallery.tsx b/src/components/dashboard/ProviderGallery.tsx index a444f20..af661fe 100644 --- a/src/components/dashboard/ProviderGallery.tsx +++ b/src/components/dashboard/ProviderGallery.tsx @@ -1,6 +1,7 @@ -import React, { useState, useEffect } from "react"; +import React, { useState, useEffect, Provider } from "react"; import ProviderGallerySlide from "./ProviderGallerySlide"; import { storage } from "../../store"; +import { Button } from "react-bootstrap"; interface GallerySlide { title: string; @@ -8,12 +9,24 @@ interface GallerySlide { imgLink: string; } +interface GalleryState { + slidesArray: GallerySlide[]; +} + export default function ProviderGallery({ - slidesArray = [], + galleryState, + setGalleryState, + deleteComponent, }: { - slidesArray?: GallerySlide[]; + galleryState: GalleryState; + setGalleryState: (newState: GalleryState) => void; + deleteComponent: () => void; }) { - const [slides, setSlides] = useState{JSON.stringify(slides, null, 2)}+
ex. "Changing lives one bit at a time..."
', + content: editorState.description, + onUpdate: ({ editor }) => { + setEditorState({ + ...editorState, + description: editor.getHTML() + }); + } }) as Editor; const [modalIsOpen, setIsOpen] = useState(false); @@ -129,7 +145,7 @@ export function SimpleEditor() { const addImage = useCallback(() => { const imageUrl: string | null = prompt("Enter the image URL"); if (imageUrl) { - editor.chain().focus().setImage({ src: imageUrl }).run(); + editor.chain().focus().setImage({ src: imageUrl }).run(); } }, [editor]); @@ -169,7 +185,7 @@ export function SimpleEditor() {