web: split `HoverOverlay` into multiple smaller components
Created by: valerybugakov
Description
This is the third preparation PR for the Code Intel redesign work. See the second one here.
Changes
- Replaced global web classes used for the badge element with colocated styles to fix https://github.com/sourcegraph/sourcegraph/issues/19899
- Added
badgeClassName
prop to pass additional web classes. - Split the
HoverOverlay
component into multiple smaller components to simplify it and be able to use theuseRedesignToggle
hook inside of the new functional components.
Note: styles should be split as well, but it adds complexity because of the redesign work. It can be done after the redesign release: https://github.com/sourcegraph/sourcegraph/issues/21368.