Change icon used in aggregations.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M6.8297 5.28995L2.5897 1.04995C2.49674 0.95622 2.38613 0.881826 2.26428 0.831057C2.14242 0.780288 2.01171 0.75415 1.8797 0.75415C1.74769 0.75415 1.61698 0.780288 1.49512 0.831057C1.37326 0.881826 1.26266 0.95622 1.1697 1.04995C0.983448 1.23731 0.878906 1.49076 0.878906 1.75495C0.878906 2.01913 0.983448 2.27259 1.1697 2.45995L4.7097 5.99995L1.1697 9.53995C0.983448 9.72731 0.878906 9.98076 0.878906 10.2449C0.878906 10.5091 0.983448 10.7626 1.1697 10.9499C1.26314 11.0426 1.37395 11.116 1.49579 11.1657C1.61763 11.2155 1.74809 11.2407 1.8797 11.2399C2.01131 11.2407 2.14177 11.2155 2.26361 11.1657C2.38544 11.116 2.49626 11.0426 2.5897 10.9499L6.8297 6.70995C6.92343 6.61699 6.99782 6.50638 7.04859 6.38453C7.09936 6.26267 7.1255 6.13196 7.1255 5.99995C7.1255 5.86794 7.09936 5.73723 7.04859 5.61537C6.99782 5.49351 6.92343 5.38291 6.8297 5.28995Z" fill="#848C91"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 977 B |
@@ -0,0 +1,4 @@
|
||||
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 3.75C1.5 2.50736 2.50736 1.5 3.75 1.5H14.25C15.4926 1.5 16.5 2.50736 16.5 3.75V14.25C16.5 15.4926 15.4926 16.5 14.25 16.5H3.75C2.50736 16.5 1.5 15.4926 1.5 14.25V3.75Z" fill="#006CB7"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.6857 6.21973C12.9786 6.51262 12.9786 6.98749 12.6857 7.28039L8.03033 12.1554C7.73744 12.4483 7.26256 12.4483 6.96967 12.1554L4.71967 9.90539C4.42678 9.61249 4.42678 9.13762 4.71967 8.84473C5.01256 8.55183 5.48744 8.55183 5.78033 8.84473L7.5 10.5644L11.625 6.21973C11.9179 5.92683 12.3928 5.92683 12.6857 6.21973Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 725 B |
+14
-2
@@ -1,15 +1,27 @@
|
||||
import { Link } from 'react-router-dom';
|
||||
import useSearch from '../../hooks/use-search';
|
||||
import styles from './ConcordanceAggregationItem.module.scss';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import selectIcon from '../../assets/chevron-right.svg';
|
||||
import selectedIcon from '../../assets/square-checkbox-solid.svg';
|
||||
|
||||
const ConcordanceAggregationItem = (props) => {
|
||||
const { t } = useTranslation();
|
||||
const search = useSearch();
|
||||
const isSelected = search.isFiltered('TextIds', props.filterKey) === true;
|
||||
const link = isSelected ? search.getClearFilterLink('TextIds', props.filterKey) : search.getFilterLink('TextIds', props.filterKey);
|
||||
|
||||
let icon;
|
||||
if (isSelected) {
|
||||
icon = <img src={selectedIcon} alt={t('shared.unselect')} />;
|
||||
} else {
|
||||
icon = <img src={selectIcon} alt={t('shared.select')} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<li className={styles.aggregationItem}><Link to={link}>{isSelected && <span className={styles.remove} >X</span>}<span className={styles.title}>{props.title}</span><span className={styles.count}>{props.count}</span></Link></li>
|
||||
<li className={styles.aggregationItem}><Link to={link}>{icon}<span className={styles.title}>{props.title}</span><span className={styles.count}>{props.count}</span></Link></li>
|
||||
);
|
||||
};
|
||||
|
||||
export default ConcordanceAggregationItem;
|
||||
export default ConcordanceAggregationItem;
|
||||
|
||||
+3
-6
@@ -9,16 +9,13 @@
|
||||
color: $text-color;
|
||||
display: flex;
|
||||
text-decoration: none;
|
||||
|
||||
.remove {
|
||||
margin-right: 0.8rem;
|
||||
}
|
||||
|
||||
|
||||
.title {
|
||||
margin-left: 1.2rem;
|
||||
flex-grow: 1;
|
||||
margin-right: 0.8rem;
|
||||
overflow: hidden;
|
||||
text-overflow: clip;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,9 @@ const resources = {
|
||||
'searchError': 'Server returned error when searching.',
|
||||
'searchHelp': 'Help',
|
||||
'searchHistory': 'Search history',
|
||||
'searchRecords': 'Showing {{start}}-{{end}} from {{total}} records.'
|
||||
'searchRecords': 'Showing {{start}}-{{end}} from {{total}} records.',
|
||||
'select': 'Select',
|
||||
'unselect': 'Remove selected'
|
||||
},
|
||||
concordance: {
|
||||
'title': 'Search concordances',
|
||||
@@ -63,7 +65,9 @@ const resources = {
|
||||
'searchError': 'Strežnik je vrnil napako pri iskanju.',
|
||||
'searchHelp': 'Pomoč',
|
||||
'searchHistory': 'Zgodovina iskanj',
|
||||
'searchRecords': 'Prikazujem {{start}}-{{end}} od {{total}} zapisov.'
|
||||
'searchRecords': 'Prikazujem {{start}}-{{end}} od {{total}} zapisov.',
|
||||
'select': 'Izberi',
|
||||
'unselect': 'Odstrani izbrano'
|
||||
},
|
||||
concordance: {
|
||||
'title': 'Iskanje po konkordancah',
|
||||
@@ -96,4 +100,4 @@ i18n
|
||||
}
|
||||
});
|
||||
|
||||
export default i18n;
|
||||
export default i18n;
|
||||
|
||||
Reference in New Issue
Block a user