import React from 'react' import classNames from 'classnames' import RaidDropdown from '~components/RaidDropdown' import './index.scss' interface Props { name: string scrolled: boolean onFilter: (element?: number, raid?: string, recency?: number) => void } const FilterBar = (props: Props) => { const elementSelect = React.createRef() const raidSelect = React.createRef() const recencySelect = React.createRef() const classes = classNames({ 'FilterBar': true, 'shadow': props.scrolled }) function selectChanged(event: React.ChangeEvent) { const elementValue = (elementSelect.current) ? parseInt(elementSelect.current.value) : -1 const raidValue = (raidSelect.current) ? raidSelect.current.value : '' const recencyValue = (recencySelect.current) ? parseInt(recencySelect.current.value) : -1 props.onFilter(elementValue, raidValue, recencyValue) } return (

{props.name}

) } export default FilterBar