mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-19 05:32:09 +00:00
give name to forwardRef components
This commit is contained in:
parent
6b28634dd0
commit
ee6f135bf6
5 changed files with 10 additions and 0 deletions
|
|
@ -44,4 +44,6 @@ const ButtonWithForwardedRef = React.forwardRef((props, ref) => (
|
|||
<Button {...props} forwardedRef={ref} />
|
||||
));
|
||||
|
||||
ButtonWithForwardedRef.displayName = 'ButtonWithForwardedRef';
|
||||
|
||||
export default ButtonWithForwardedRef;
|
||||
|
|
|
|||
|
|
@ -9,4 +9,6 @@ const Focusable = React.forwardRef(({ children, ...props }, ref) => {
|
|||
);
|
||||
});
|
||||
|
||||
Focusable.displayName = 'Focusable';
|
||||
|
||||
export default Focusable;
|
||||
|
|
|
|||
|
|
@ -4,4 +4,6 @@ const Label = React.forwardRef(({ children, ...props }, ref) => {
|
|||
return React.cloneElement(React.Children.only(children), { ...props, ref });
|
||||
});
|
||||
|
||||
Label.displayName = 'Popup.Label';
|
||||
|
||||
export default Label;
|
||||
|
|
|
|||
|
|
@ -6,4 +6,6 @@ const Menu = React.forwardRef(({ children }, ref) => (
|
|||
</div>
|
||||
));
|
||||
|
||||
Menu.displayName = 'Popup.Menu';
|
||||
|
||||
export default Menu;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ const ControlBarButton = React.forwardRef(({ icon, active, disabled, onClick },
|
|||
</div>
|
||||
));
|
||||
|
||||
ControlBarButton.displayName = 'ControlBarButton';
|
||||
|
||||
class ControlBar extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
|
|||
Loading…
Reference in a new issue