Convert the code into sa re-usable component

add input as parameter to the lablesComponent function and adjust all
selectors