*/
import classNames from 'classnames';
import * as React from 'react';
+import { ButtonPlain } from '../../../components/controls/buttons';
import ChevronDownIcon from '../../../components/icons/ChevronDownIcon';
import ChevronUpIcon from '../../../components/icons/ChevronUpIcon';
import { RawHotspot } from '../../../types/security-hotspots';
return (
<div className={classNames('hotspot-category', risk)}>
{props.onToggleExpand ? (
- <a
+ <ButtonPlain
className={classNames(
'hotspot-category-header display-flex-space-between display-flex-center',
{ 'contains-selected-hotspot': selectedHotspot.securityCategory === categoryKey }
)}
- href="#"
- onClick={() => props.onToggleExpand && props.onToggleExpand(categoryKey, !expanded)}>
+ onClick={() => props.onToggleExpand && props.onToggleExpand(categoryKey, !expanded)}
+ aria-expanded={expanded}>
<strong className="flex-1 spacer-right break-word">{title}</strong>
<span>
<span className="counter-badge">
<ChevronDownIcon className="big-spacer-left" />
)}
</span>
- </a>
+ </ButtonPlain>
) : (
<div className="hotspot-category-header">
<strong className="flex-1 spacer-right break-word">{title}</strong>
}
.hotspot-category .hotspot-category-header {
+ width: 100%;
padding: calc(2 * var(--gridSize)) var(--gridSize);
color: var(--baseFontColor);
border-bottom: none;
border-left: 4px solid;
}
+.hotspot-category strong {
+ text-align: left;
+}
+
.hotspot-category .hotspot-category-header:hover,
.hotspot-category .hotspot-category-header.contains-selected-hotspot {
color: var(--blue);
<div
className="hotspot-category HIGH"
>
- <a
+ <ButtonPlain
+ aria-expanded={true}
className="hotspot-category-header display-flex-space-between display-flex-center"
- href="#"
onClick={[Function]}
>
<strong
className="big-spacer-left"
/>
</span>
- </a>
+ </ButtonPlain>
<ul>
<li
data-hotspot-key="h1"
<div
className="hotspot-category HIGH"
>
- <a
+ <ButtonPlain
+ aria-expanded={false}
className="hotspot-category-header display-flex-space-between display-flex-center"
- href="#"
onClick={[Function]}
>
<strong
className="big-spacer-left"
/>
</span>
- </a>
+ </ButtonPlain>
</div>
`;
<div
className="hotspot-category HIGH"
>
- <a
+ <ButtonPlain
+ aria-expanded={true}
className="hotspot-category-header display-flex-space-between display-flex-center contains-selected-hotspot"
- href="#"
onClick={[Function]}
>
<strong
className="big-spacer-left"
/>
</span>
- </a>
+ </ButtonPlain>
<ul>
<li
data-hotspot-key="h1"
<div
className="hotspot-category HIGH"
>
- <a
+ <ButtonPlain
+ aria-expanded={true}
className="hotspot-category-header display-flex-space-between display-flex-center"
- href="#"
onClick={[Function]}
>
<strong
className="big-spacer-left"
/>
</span>
- </a>
+ </ButtonPlain>
<ul>
<li
data-hotspot-key="h1"