-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
100 additions
and
189 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
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
56 changes: 56 additions & 0 deletions
56
...ssifier/src/components/Classifier/components/Layout/components/shared/StyledContainers.js
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,56 @@ | ||
import styled, { css } from 'styled-components' | ||
import { Box, Grid } from 'grommet' | ||
import ImageToolbar from '@components/Classifier/components/ImageToolbar' | ||
|
||
export const ViewerGrid = styled(Grid)` | ||
${props => props.hasSurveyTask | ||
? css` | ||
@media screen and (min-width: 70rem) { | ||
position: sticky; | ||
top: 10px; | ||
} | ||
` | ||
: css` | ||
@media screen and (min-width: 769px) { | ||
position: sticky; | ||
top: 10px; | ||
} | ||
`} | ||
height: fit-content; | ||
grid-area: viewer; | ||
grid-template-columns: auto clamp(3rem, 10%, 4.5rem); | ||
grid-template-rows: auto; | ||
grid-template-areas: 'subject toolbar'; | ||
` | ||
|
||
export const StyledSubjectContainer = styled(Box)` | ||
grid-area: subject; | ||
position: sticky; | ||
` | ||
|
||
export const StyledImageToolbarContainer = styled.div` | ||
grid-area: toolbar; | ||
` | ||
|
||
export const StyledImageToolbar = styled(ImageToolbar)` | ||
position: sticky; | ||
top: 10px; | ||
` | ||
|
||
export const StyledTaskAreaContainer = styled.div` | ||
grid-area: task; | ||
` | ||
|
||
export const StyledTaskArea = styled(Box)` | ||
${props => props.hasSurveyTask ? css` | ||
@media screen and (min-width: 70rem) { | ||
position: sticky; | ||
top: 10px; | ||
} | ||
` : css` | ||
@media screen and (min-width: 769px) { | ||
position: sticky; | ||
top: 10px; | ||
} | ||
`} | ||
` |