Commit d710b8bc authored by Oleksii Savran's avatar Oleksii Savran

Merge branch '285-bioclim-variables-spacing' into 'master'

Resolve "Bioclim variables spacing"

Closes #285

See merge request genesys-pgr/genesys-ui!297
parents 65a1d30a 2c6bd386
......@@ -35,9 +35,9 @@ const BioClimateDisplay = ({climateData, t, extraFilters, applyClimateFilters, .
</div>
</PageSection>
<PageSection title={ t('accessions.public.p.display.additionalInfo') }>
<Properties>
<Properties spacing={ 16 }>
{ [...Array(19).keys()].map((i) => (
<PropertiesItem md numeric key={ `month-${i}` } title={ t(`accessions.climate.bio${i + 1}`) }>
<PropertiesItem md numeric key={ `month-${i}` } title={ t(`accessions.climate.bio${i + 1}`) } className="pt-0 pb-0">
{ climateData[`bio${i + 1}`] && Number(climateData[`bio${i + 1}`]).toFixed(1) }
</PropertiesItem>
)) }
......
......@@ -19,11 +19,13 @@ const styles = (theme) => ({
// '& > *:first-child': {
// borderRight: 'solid 2px white',
// },
'&:nth-child(even)': {
'&:nth-child(even) > div': {
backgroundColor: '#f8f7f5',
height: '100%',
},
'&:nth-child(odd)': {
'&:nth-child(odd) > div': {
backgroundColor: '#f3f2ee',
height: '100%',
},
/* tslint:enable */
},
......@@ -94,15 +96,16 @@ class PropertiesItem1 extends React.Component<IItemProps & WithStyles<'propertie
interface IProps extends React.ClassAttributes<any> {
className?: string;
spacing?: 0 | 8 | 16 | 24 | 32 | 40;
// classes: any;
// children: any;
}
class Properties1 extends React.Component<IProps & WithStyles<'propertiesContainer' | 'propertiesRow' | 'propertiesValue' | 'propertiesValueSmall' | 'propertiesValueNumeric'>, any> {
public render() {
const { children, classes} = this.props;
const { children, classes, spacing} = this.props;
return (
<Grid container spacing={ 0 } className={ classes.propertiesContainer }>
<Grid container spacing={ spacing || 0 } className={ classes.propertiesContainer }>
{ children }
</Grid>
);
......
......@@ -651,6 +651,14 @@ h4 {
}
}
.pt-0 {
padding-top: 0 !important;
}
.pb-0 {
padding-bottom: 0 !important;
}
.pt-5 {
padding-top: 5px !important;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment