Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
value === siteFilter.value ? 'bg-gray color-white' : ''
}`}
onClick={e => {
e.preventDefault();
// track click
if (window && window.analytics) {
analytics.track('Searched docs', {
query: this.props.searchTerm,
toggle: true,
site: this.props.site
});
}
onSelect(siteFilter.value);
}}
>
{getFilterValueDisplay(siteFilter.value)}
<div>
<button> {
e.preventDefault();
onRemove(value);
}}
className={`toggle py3 ${!value ? 'bg-gray color-white' : ''}`}
>
All docs
</button>
</div>