Add title attributes to section headers

[See #91]
This commit is contained in:
Tom Russell 2018-10-25 10:47:19 +01:00
parent 5661af9df4
commit 3512ecfaed
2 changed files with 5 additions and 3 deletions

View File

@ -54,6 +54,8 @@ const DataSection = (props) => {
<header className={(match? "active " : "") + "bullet-prefix section-header"}>
<NavLink
to={`/building/${props.building_id}.html` + ((match)? '': `?cat=${props.slug}`)}
title={(props.inactive)? 'Coming soon… Click the ? for more info.' :
(match)? 'Hide details' : 'Show details'}
isActive={() => match}>
<h3 className="h3">{props.title}</h3>
</NavLink>
@ -75,7 +77,6 @@ const DataSection = (props) => {
}
</nav>
</header>
{ (match && props.intro)? <p className="data-intro">{ props.intro }</p> : null }
{ match? <dl className="data-list">{props.children}</dl> : null }
{
(match && !props.inactive)?

View File

@ -90,7 +90,9 @@ const LegendGroup = (props) => {
<header className="bullet-prefix section-header">
<NavLink
to={`/map/${props.slug}.html`}
isActive={() => match}>
isActive={() => match}
title={(inactive)? 'Coming soon… Click the ? for more info.' :
(match)? '' : 'Show on map'}>
<h3 className="h3">{props.title}</h3>
</NavLink>
{
@ -103,7 +105,6 @@ const LegendGroup = (props) => {
: null
}
</header>
{ (match && props.intro)? <p className="data-intro">{ props.intro }</p> : null }
<dl className="data-list">
{
(match && props.maps)?