// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. import React, {useCallback} from 'react'; import {Modal, StyleSheet, useWindowDimensions, View} from 'react-native'; import HighlightItem from './item'; type Props = { children?: React.ReactNode; itemBounds: TutorialItemBounds; itemBorderRadius?: number; onDismiss: () => void; onLayout: () => void; onShow?: () => void; } const TutorialHighlight = ({children, itemBounds, itemBorderRadius, onDismiss, onLayout, onShow}: Props) => { const {width, height} = useWindowDimensions(); const handleShowTutorial = useCallback(() => { if (onShow) { setTimeout(onShow, 1000); } }, [itemBounds]); return ( {itemBounds.endX > 0 && } {children} ); }; export default TutorialHighlight;