Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TS migration] Migrate Hoverable #30339

Merged
33 changes: 0 additions & 33 deletions src/components/Hoverable/hoverablePropTypes.js

This file was deleted.

222 changes: 0 additions & 222 deletions src/components/Hoverable/index.js

This file was deleted.

22 changes: 0 additions & 22 deletions src/components/Hoverable/index.native.js

This file was deleted.

17 changes: 17 additions & 0 deletions src/components/Hoverable/index.native.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react';
import {View} from 'react-native';
import HoverableProps from './types';

/**
* On mobile, there is no concept of hovering, so we return a plain wrapper around the component's children,
* where the hover state is always false.
*/
function Hoverable({children}: HoverableProps) {
const childrenWithHoverState = typeof children === 'function' ? children(false) : children;

return <View>{childrenWithHoverState}</View>;
}

Hoverable.displayName = 'Hoverable';

export default Hoverable;
Loading
Loading