-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove document count, correctly pluralize "studies", add fullscreen
- Loading branch information
Showing
6 changed files
with
149 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.dialog { | ||
width: 100dvw; | ||
height: 100dvh; | ||
} | ||
|
||
.studiesHeader { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
justify-content: space-between; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/components/FullScreenIconButton/FullScreenIconButton.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.button { | ||
border: unset; | ||
background-color: unset; | ||
color: unset; | ||
cursor: pointer; | ||
} |
49 changes: 49 additions & 0 deletions
49
src/components/FullScreenIconButton/FullScreenIconButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import styles from "./FullScreenIconButton.module.css"; | ||
|
||
interface FullScreenIconButtonProps { | ||
isFullscreen: boolean; | ||
onClick: React.MouseEventHandler<HTMLButtonElement>; | ||
} | ||
|
||
export const FullScreenIconButton = ({ | ||
isFullscreen, | ||
onClick, | ||
}: FullScreenIconButtonProps) => { | ||
return ( | ||
<button | ||
className={styles.button} | ||
onClick={onClick} | ||
title={isFullscreen ? "Exit full screen" : "Enter full screen"} | ||
> | ||
{isFullscreen ? <FullscreenIcon /> : <ExitFullscreenIcon />} | ||
</button> | ||
); | ||
}; | ||
|
||
function FullscreenIcon() { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
height="24px" | ||
viewBox="0 -960 960 960" | ||
width="24px" | ||
fill="currentColor" | ||
> | ||
<path d="M240-120v-120H120v-80h200v200h-80Zm400 0v-200h200v80H720v120h-80ZM120-640v-80h120v-120h80v200H120Zm520 0v-200h80v120h120v80H640Z" /> | ||
</svg> | ||
); | ||
} | ||
|
||
function ExitFullscreenIcon() { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
height="24px" | ||
viewBox="0 -960 960 960" | ||
width="24px" | ||
fill="currentColor" | ||
> | ||
<path d="M120-120v-200h80v120h120v80H120Zm520 0v-80h120v-120h80v200H640ZM120-640v-200h200v80H200v120h-80Zm640 0v-120H640v-80h200v200h-80Z" /> | ||
</svg> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters