Change dynamic panel states inside components

I have a dynamic panel with multiple states and turned it into a component. I would like to change the dynamic panel states using a button outside the component. Need help pls!