An icon is often used on the button to expand or collapse an element. The icon should point in the direction of the action; it should not illustrate the current state. E.g. if you were to swap the icon with text it should say "Expand" when collapsed and "Collapse" when expanded.