-
Notifications
You must be signed in to change notification settings - Fork 16
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 #1358 from edenia/dev
Production Release
- Loading branch information
Showing
115 changed files
with
1,821 additions
and
1,751 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 |
---|---|---|
@@ -1,13 +1,24 @@ | ||
.grecaptcha-badge { | ||
width: 70px !important; | ||
overflow: hidden !important; | ||
transition: all 0.3s ease !important; | ||
right: 0px !important; | ||
bottom: 70px !important; | ||
} | ||
|
||
.grecaptcha-badge:hover { | ||
width: 256px !important; | ||
} | ||
|
||
|
||
width: 70px !important; | ||
overflow: hidden !important; | ||
transition: all 0.3s ease !important; | ||
right: 0px !important; | ||
bottom: 70px !important; | ||
} | ||
|
||
.grecaptcha-badge:hover { | ||
width: 256px !important; | ||
} | ||
|
||
@media (prefers-color-scheme: light) { | ||
body { | ||
background: #FFF; | ||
color: #000; | ||
} | ||
} | ||
@media (prefers-color-scheme: dark) { | ||
body { | ||
background: #051B34; | ||
color: #FFF; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
import React from 'react' | ||
import clsx from 'clsx' | ||
import { makeStyles } from '@mui/styles' | ||
import { useTranslation } from 'react-i18next' | ||
import PropTypes from 'prop-types' | ||
import Select from '@mui/material/Select' | ||
import MenuItem from '@mui/material/MenuItem' | ||
import FormControl from '@mui/material/FormControl' | ||
import InputLabel from '@mui/material/InputLabel' | ||
import Typography from '@mui/material/Typography' | ||
|
||
import PauseButton from '../../components/PauseButton' | ||
|
||
import styles from './styles' | ||
|
||
const useStyles = makeStyles(styles) | ||
|
||
const ChartHeader = ({ | ||
title, | ||
options, | ||
value, | ||
isHistoryEnabled, | ||
isLive, | ||
isPaused, | ||
onSelect, | ||
handlePause, | ||
ariaLabel, | ||
}) => { | ||
const classes = useStyles() | ||
const { t } = useTranslation() | ||
|
||
return ( | ||
<div className={classes.headerContainer}> | ||
<Typography component="p" variant="h6"> | ||
{title} | ||
</Typography> | ||
<div | ||
className={clsx(classes.formControl, { | ||
[classes.onlySelect]: isHistoryEnabled && !handlePause, | ||
})} | ||
> | ||
<FormControl> | ||
{isHistoryEnabled && ( | ||
<> | ||
<InputLabel htmlFor={ariaLabel}>{t('timeFrame')}</InputLabel> | ||
<Select | ||
inputProps={{ id: ariaLabel }} | ||
value={value} | ||
onChange={(e) => onSelect(e.target.value)} | ||
fullWidth | ||
> | ||
{options.map((item, index) => ( | ||
<MenuItem key={index} value={item}> | ||
{t(item)} | ||
</MenuItem> | ||
))} | ||
</Select> | ||
</> | ||
)} | ||
</FormControl> | ||
{handlePause && ( | ||
<PauseButton | ||
handlePause={handlePause} | ||
isPaused={isPaused} | ||
isEnabled={isLive} | ||
/> | ||
)} | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
ChartHeader.propTypes = { | ||
ariaLabel: PropTypes.string, | ||
title: PropTypes.string, | ||
isPaused: PropTypes.bool, | ||
handlePause: PropTypes.func, | ||
value: PropTypes.string, | ||
options: PropTypes.array, | ||
isLive: PropTypes.bool, | ||
isHistoryEnabled: PropTypes.bool, | ||
onSelect: PropTypes.func, | ||
} | ||
|
||
ChartHeader.defaultProps = { | ||
title: '', | ||
ariaLabel: '', | ||
isPaused: false, | ||
isLive: false, | ||
isHistoryEnabled: false, | ||
handlePause: undefined, | ||
onSelect: undefined, | ||
} | ||
|
||
export default ChartHeader |
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
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
Oops, something went wrong.