Added classNames to all the anchor DOM elements.

This commit is contained in:
Filip Barl
2018-02-15 13:25:50 +01:00
parent 474298c39c
commit 1a6e49fd3d
3 changed files with 8 additions and 7 deletions

View File

@@ -39,7 +39,7 @@ class Topologies extends React.Component {
const isActive = subTopology === this.props.currentTopology;
const searchMatchCount = this.props.searchMatchCountByTopology.get(topologyId) || 0;
const title = basicTopologyInfo(subTopology, searchMatchCount);
const className = classnames('topologies-sub-item', {
const className = classnames(`topologies-sub-item topologies-item-${topologyId}`, {
// Don't show matches in the resource view as searching is not supported there yet.
'topologies-sub-item-matched': !this.props.isResourceViewMode && searchMatchCount,
'topologies-sub-item-active': isActive,
@@ -60,14 +60,14 @@ class Topologies extends React.Component {
}
renderTopology(topology) {
const topologyId = topology.get('id');
const isActive = topology === this.props.currentTopology;
const searchMatchCount = this.props.searchMatchCountByTopology.get(topology.get('id')) || 0;
const className = classnames('topologies-item-main', {
const className = classnames(`topologies-item-main topologies-item-${topologyId}`, {
// Don't show matches in the resource view as searching is not supported there yet.
'topologies-item-main-matched': !this.props.isResourceViewMode && searchMatchCount,
'topologies-item-main-active': isActive,
});
const topologyId = topology.get('id');
const title = basicTopologyInfo(topology, searchMatchCount);
return (

View File

@@ -25,8 +25,9 @@ class ViewModeSelector extends React.Component {
}
renderItem(icons, label, viewMode, setViewModeAction, isEnabled = true) {
if (label === 'Table') console.log('render table view action');
const isSelected = (this.props.topologyViewMode === viewMode);
const className = classNames('view-mode-selector-action', {
const className = classNames(`view-mode-selector-action view-${label}-action`, {
'view-mode-selector-action-selected': isSelected,
});
const onClick = () => {

View File

@@ -371,10 +371,10 @@ a {
.nodes-chart-overlay {
pointer-events: none;
opacity: 0;
opacity: $node-elements-in-background-opacity;
&.active {
opacity: $node-elements-in-background-opacity;
&:not(.active) {
display: none;
}
}