Commit 650d94ba authored by Kyle Keating's avatar Kyle Keating

Fix eslint issues in HelpPanel component

- <a> tags without real href attributes should be converted to buttons.
- Did not use our button component in this instance because we don’t have control over the icon position relative to the text.
parent 42c71af2
......@@ -105,34 +105,30 @@ function HelpPanel({ auth, session }) {
</h3>
<div className="help-panel__footer">
{activeSubPanel === 'versionInfo' && (
// FIXME-A11Y
// eslint-disable-next-line jsx-a11y/anchor-is-valid
<a
href="#"
<button
className="help-panel__sub-panel-link"
onClick={e => openSubPanel(e, 'tutorial')}
aria-label="Show tutorial panel"
>
<div>Getting started</div>
Getting started
<SvgIcon
name="arrow-right"
className="help-panel__sub-panel-link-icon"
/>
</a>
</button>
)}
{activeSubPanel === 'tutorial' && (
// FIXME-A11Y
// eslint-disable-next-line jsx-a11y/anchor-is-valid
<a
href="#"
<button
className="help-panel__sub-panel-link"
onClick={e => openSubPanel(e, 'versionInfo')}
aria-label="Show version information panel"
>
<div>About this version</div>
About this version
<SvgIcon
name="arrow-right"
className="help-panel__sub-panel-link-icon"
/>
</a>
</button>
)}
</div>
</div>
......
@use "../../mixins/buttons";
@use "../../variables" as var;
.help-panel {
......@@ -29,6 +30,7 @@
}
&__sub-panel-link {
@include buttons.reset-native-btn-styles;
display: flex;
align-items: center;
margin-left: auto;
......
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