Add disclaimer to legend

This commit is contained in:
Maciej Ziarkowski 2020-02-10 23:38:46 +00:00
parent 84e4d80b3e
commit 48de4fd645
2 changed files with 12 additions and 1 deletions

View File

@ -7,7 +7,8 @@
right: 10px;
z-index: 1000;
min-width: 12rem;
min-width: 14rem;
max-width: 14rem;
max-height: 60%;
display: flex;
@ -63,6 +64,11 @@
.map-legend p {
margin: 0.25rem 0 0.5rem;
}
.map-legend .legend-disclaimer {
font-size: 0.8em;
padding:0;
}
.data-legend {
overflow: auto;
list-style: none;

View File

@ -99,6 +99,7 @@ const LEGEND_CONFIG = {
},
planning: {
title: 'Planning',
disclaimer: 'All data relating to designated buildings should be checked on the National Heritage List for England or local authority websites where used for planning or development purposes',
elements: [
{ color: '#c72e08', text: 'Grade I listed'},
{ color: '#e75b42', text: 'Grade II* listed'},
@ -200,6 +201,10 @@ class Legend extends React.Component<LegendProps, LegendState> {
{
elements.length?
<ul className={this.state.collapseList ? 'collapse data-legend' : 'data-legend'} >
{
details.disclaimer &&
<p className='legend-disclaimer'>{details.disclaimer}</p>
}
{
elements.map((item) => (