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.scss | 21 +----------------- .../views/newlightbox/Header/LightboxHeader.tsx | 25 +++++++++------------- 2 files changed, 11 insertions(+), 35 deletions(-) (limited to 'src/client/views/newlightbox/Header') diff --git a/src/client/views/newlightbox/Header/LightboxHeader.scss b/src/client/views/newlightbox/Header/LightboxHeader.scss index 2872a383b..a9e60ea98 100644 --- a/src/client/views/newlightbox/Header/LightboxHeader.scss +++ b/src/client/views/newlightbox/Header/LightboxHeader.scss @@ -59,26 +59,7 @@ background: $blue-l1; } } - - .lb-button2 { - padding: 3px; - cursor: pointer; - display: flex; - flex-direction: row; - justify-content: space-evenly; - align-items: center; - transition: 0.2s ease; - gap: 5px; - font-size: 15px; - height: fit-content; - border-radius: 3px; - - &:hover { - background: $gray-l2; - transform: scale(1.01); - } - } - + &.dark { background: $black; } 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(NewLightboxView.LightboxDoc) + const [doc, setDoc] = React.useState(LightboxView.LightboxDoc) const [editing, setEditing] = React.useState(false) const [title, setTitle] = React.useState( (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(false) @@ -47,21 +49,14 @@ export const NewLightboxHeader = (props: INewLightboxHeader) => {
{getType(StrCast(doc.type))}
-
setSaved(!saved)}> - {saved ? : } -
-
setSaved(!saved)}> - {saved ? : } -
+ setSaved(!saved)} color={Colors.DARK_GRAY} icon={saved ? : }/> + setSaved(!saved)} color={Colors.DARK_GRAY} icon={saved ? : }/>
-
{ +
+ }} size={Size.XSMALL} color={Colors.DARK_GRAY} type={Type.SEC} text={"t-SNE 2D Embeddings"} icon={}/>
} \ No newline at end of file -- cgit v1.2.3-70-g09d2