-
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.
Merge pull request #41 from azavea/rm/animate-time-slider
Add animated temporal progress bar
- Loading branch information
Showing
4 changed files
with
112 additions
and
61 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { HStack, Box } from '@chakra-ui/react'; | ||
|
||
export function ColorRangeBox({ bg, text }: { bg: string, text?: String }) { | ||
return ( | ||
<Box | ||
w='70px' | ||
h='40px' | ||
bg={bg} | ||
textAlign={'center'} | ||
color={'white'} | ||
fontSize={'sm'} | ||
pt='8px' | ||
> | ||
{text} | ||
</Box> | ||
); | ||
} | ||
|
||
export default function AnimatedMapLegend() { | ||
return ( | ||
<Box width='100%' pl='20%'> | ||
<HStack spacing='0px' border={'1px'} width='210px'> | ||
<ColorRangeBox bg='white' /> | ||
<ColorRangeBox bg='#94A4DF' text='≥1% BIL' /> | ||
<ColorRangeBox bg='#465EB5' text='≥2% BIL' /> | ||
</HStack> | ||
</Box> | ||
); | ||
} |
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,21 @@ | ||
import { Icon } from '@chakra-ui/react'; | ||
|
||
export default function TimeControlIcon({ restart }: { restart: boolean }) { | ||
return restart ? ( | ||
<Icon viewBox='0 0 512 512' color='black' width='45px' height='45px'> | ||
<path | ||
fill='currentColor' | ||
d='M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z' | ||
data-attibution='Font Awesome Pro 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc.' | ||
/> | ||
</Icon> | ||
) : ( | ||
<Icon viewBox='0 0 384 512' color='black' width='55px' height='55px'> | ||
<path | ||
fill='currentColor' | ||
d='M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80V432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z' | ||
data-attibution='Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc.' | ||
/> | ||
</Icon> | ||
); | ||
} |
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