From abd79b36f15466db05a2c1f379260b85e4ae838b Mon Sep 17 00:00:00 2001
From: Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>
Date: Wed, 7 Jun 2023 11:50:45 -0400
Subject: added doc recommendations to search

---
 .../views/newlightbox/Header/LightboxHeader.tsx    | 25 +++++++++-------------
 1 file changed, 10 insertions(+), 15 deletions(-)

(limited to 'src/client/views/newlightbox/Header/LightboxHeader.tsx')

diff --git a/src/client/views/newlightbox/Header/LightboxHeader.tsx b/src/client/views/newlightbox/Header/LightboxHeader.tsx
index a542d2943..a272ce294 100644
--- a/src/client/views/newlightbox/Header/LightboxHeader.tsx
+++ b/src/client/views/newlightbox/Header/LightboxHeader.tsx
@@ -5,21 +5,23 @@ import { NewLightboxView } from '../NewLightboxView';
 import { StrCast } from '../../../../fields/Types';
 import { EditableText } from '../components/EditableText';
 import { getType } from '../utils';
-import { Button, Size, Type } from 'browndash-components';
+import { Button, IconButton, Size, Type } from 'browndash-components';
 import { MdExplore, MdTravelExplore } from 'react-icons/md'
 import { BsBookmark, BsBookmarkFill } from 'react-icons/bs'
 import { Doc } from '../../../../fields/Doc';
+import { LightboxView } from '../../LightboxView';
+import { Colors } from '../../global/globalEnums';
 
 
 export const NewLightboxHeader = (props: INewLightboxHeader) => {
     const {height = 100, width} = props;
-    const [doc, setDoc] = React.useState<Doc | undefined>(NewLightboxView.LightboxDoc)
+    const [doc, setDoc] = React.useState<Doc | undefined>(LightboxView.LightboxDoc)
     const [editing, setEditing] = React.useState<boolean>(false)
     const [title, setTitle] = React.useState<JSX.Element | null>(
         (null)
     )
     React.useEffect(() => {
-        let lbDoc = NewLightboxView.LightboxDoc
+        let lbDoc = LightboxView.LightboxDoc
         setDoc(lbDoc)
         if (lbDoc) {
             setTitle(
@@ -32,7 +34,7 @@ export const NewLightboxHeader = (props: INewLightboxHeader) => {
                 setEditing={setEditing}            
             />)
         }
-    }, [NewLightboxView.LightboxDoc])
+    }, [LightboxView.LightboxDoc])
 
     const [saved, setSaved] = React.useState<boolean>(false)
 
@@ -47,21 +49,14 @@ export const NewLightboxHeader = (props: INewLightboxHeader) => {
             <div className={`type`}>{getType(StrCast(doc.type))}</div>
         </div>
         <div style={{gridColumn: 2, gridRow: 1, height: '100%', display: 'flex', justifyContent: 'flex-end', alignItems: 'center'}}>
-            <div className={`lb-button2`} onClick={() => setSaved(!saved)}>
-                {saved ? <BsBookmarkFill/> : <BsBookmark/>}
-            </div>
-            <div className={`lb-button2`} onClick={() => setSaved(!saved)}>
-                {saved ? <BsBookmarkFill/> : <BsBookmark/>}
-            </div>
+            <IconButton size={Size.XSMALL} onClick={() => setSaved(!saved)} color={Colors.DARK_GRAY} icon={saved ? <BsBookmarkFill/> : <BsBookmark/>}/>
+            <IconButton size={Size.XSMALL} onClick={() => setSaved(!saved)} color={Colors.DARK_GRAY} icon={saved ? <BsBookmarkFill/> : <BsBookmark/>}/>
         </div>
         <div  style={{gridColumn: 2, gridRow: 2, height: '100%', display: 'flex', justifyContent: 'flex-end', alignItems: 'center'}}>
-            <div className={`lb-button ${NewLightboxView.ExploreMode}`} onClick={() => {
+            <Button onClick={() => {
                 console.log(NewLightboxView.ExploreMode)
                 NewLightboxView.SetExploreMode(!NewLightboxView.ExploreMode)
-            }}>
-                <MdTravelExplore/>
-                t-SNE 2D Embeddings
-            </div>
+            }} size={Size.XSMALL} color={Colors.DARK_GRAY} type={Type.SEC} text={"t-SNE 2D Embeddings"} icon={<MdTravelExplore/>}/>
         </div>
     </div>
 }
\ No newline at end of file
-- 
cgit v1.2.3-70-g09d2

