Component for checking if element has a given class