import React, { useContext } from 'react'; import { View, ViewProps } from 'react-native'; import { GridContext } from './index'; import { ApplicationContext, MiniAppContext } from '../Context'; import styles from './styles'; import { SpanNumber } from './types'; export interface ItemProps extends ViewProps { /** * Represents the width of the Card component in terms of span numbers (1-12). */ widthSpan?: SpanNumber; /** * Optional. Represents the height of the Card component in terms of span numbers (1-12). */ heightSpan?: SpanNumber; } const Item: React.FC = ({ widthSpan, heightSpan, children, style, }) => { const { showGrid } = useContext(ApplicationContext); const context = useContext(MiniAppContext); const grid = useContext(GridContext); const showBaseLineDebug = context?.features?.showBaseLineDebug ?? false; /** * render overlay view only dev mode */ const renderOverlay = () => { return ; }; return ( {children} {showGrid && renderOverlay()} ); }; Item.displayName = 'Item'; export default Item;