Skip to content

Commit

Permalink
Update Image360Details.tsx (#4840)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilscognite authored Nov 1, 2024
1 parent e7004e4 commit 5f2de74
Showing 1 changed file with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { useState, type ReactElement, useCallback, useEffect } from 'react';
import styled from 'styled-components';
import { Image360HistoricalDetails } from '../Image360HistoricalDetails/Image360HistoricalDetails';
import { type Image360 } from '@cognite/reveal';
import { Button, CloseLargeIcon } from '@cognite/cogs.js';
import { useReveal } from '../RevealCanvas/ViewerContext';
import { useImage360Collections } from '../../hooks/useImage360Collections';

Expand All @@ -26,10 +25,6 @@ export function Image360Details({ appLanguage }: Image360DetailsProps): ReactEle
setEnteredEntity(undefined);
}, [setEnteredEntity]);

const exitImage360Image = useCallback((): void => {
viewer.exit360Image();
}, [viewer]);

const collections = useImage360Collections();

useEffect(() => {
Expand Down Expand Up @@ -57,30 +52,12 @@ export function Image360Details({ appLanguage }: Image360DetailsProps): ReactEle
fallbackLanguage={appLanguage}
/>
</Image360HistoricalPanel>
<ExitButtonContainer>
<StyledExitButton icon=<CloseLargeIcon /> type="tertiary" onClick={exitImage360Image} />
</ExitButtonContainer>
</>
)}
</>
);
}

const StyledExitButton = styled(Button)`
border-radius: 8px;
`;

const ExitButtonContainer = styled.div`
position: absolute;
right: 20px;
top: 20px;
background-color: #ffffff;
height: 36px;
width: 36px;
border-radius: 8px;
outline: none;
`;

const Image360HistoricalPanel = styled.div<{ isExpanded: boolean }>`
position: absolute;
bottom: ${({ isExpanded }) => (isExpanded ? '0px' : '40px')};
Expand Down

0 comments on commit 5f2de74

Please sign in to comment.