buttons always have enabled/disabled state

fixes #1085
This commit is contained in:
Mateusz Konieczny 2023-02-15 08:25:06 +01:00
parent 741df74c7f
commit 0f62cad9db
2 changed files with 4 additions and 8 deletions

View File

@ -106,11 +106,11 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
<InfoBox type='info'>Click and colour buildings here if you think they may be subject to a future planning application involving demolition. To add your opinion on how well this building works, please also visit the <Link to={communityLinkUrl}>Community</Link> section.</InfoBox> <InfoBox type='info'>Click and colour buildings here if you think they may be subject to a future planning application involving demolition. To add your opinion on how well this building works, please also visit the <Link to={communityLinkUrl}>Community</Link> section.</InfoBox>
{ {
props.mapColourScale != "community_expected_planning_application_total" ? props.mapColourScale != "community_expected_planning_application_total" ?
<button className={`map-switcher-inline no-applicable-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToExpectedApplicationMapStyle}> <button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToExpectedApplicationMapStyle}>
{'Click here to view possible locations of future applications'} {'Click here to view possible locations of future applications'}
</button> </button>
: :
<button className={`map-switcher-inline no-applicable-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToAllPlanningApplicationsMapStyle}> <button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToAllPlanningApplicationsMapStyle}>
{'Click to see planning applications'} {'Click to see planning applications'}
</button> </button>
} }
@ -210,11 +210,11 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
</div> </div>
{ {
props.mapColourScale != "planning_combined" ? props.mapColourScale != "planning_combined" ?
<button className={`map-switcher-inline no-applicable-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToBuildingProtectionMapStyle}> <button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToBuildingProtectionMapStyle}>
{'Click to see individual protected buildings mapped'} {'Click to see individual protected buildings mapped'}
</button> </button>
: :
<button className={`map-switcher-inline no-applicable-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToAllPlanningApplicationsMapStyle}> <button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToAllPlanningApplicationsMapStyle}>
{'Click to see planning applications'} {'Click to see planning applications'}
</button> </button>
} }

View File

@ -33,9 +33,6 @@
background-image: none; background-image: none;
border-color: #343a40; border-color: #343a40;
} }
.map-switcher-inline.night.no-applicable-state {
color: #191b1d;
}
.map-switcher-inline.disabled-state, .map-switcher-inline.disabled-state,
.map-button.disabled-state, .map-button.disabled-state,
.map-button.disabled-state .btn{ .map-button.disabled-state .btn{
@ -63,7 +60,6 @@
background-color: #448844; background-color: #448844;
} }
.map-switcher-inline.night.no-applicable-state,
.map-button.enabled .btn:hover, .map-button.enabled .btn:hover,
.map-button.night.enabled .btn:hover { .map-button.night.enabled .btn:hover {
background-color: transparent; background-color: transparent;