// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. import React, {useMemo} from 'react'; import {StyleSheet} from 'react-native'; import Svg, {ClipPath, Defs, G, Path, Rect} from 'react-native-svg'; import tinyColor from 'tinycolor2'; import {useTheme} from '@context/theme'; import {constructRectangularPathWithBorderRadius} from '@utils/svg'; type Props = { borderRadius?: number; height: number; itemBounds: TutorialItemBounds; onDismiss: () => void; width: number; } const HighlightItem = ({height, itemBounds, onDismiss, borderRadius = 0, width}: Props) => { const theme = useTheme(); const isDark = tinyColor(theme.centerChannelBg).isDark(); const pathD = useMemo(() => { const parent = {startX: 0, startY: 0, endX: width, endY: height}; return constructRectangularPathWithBorderRadius(parent, itemBounds, borderRadius); }, [borderRadius, itemBounds, width]); return ( ); }; export default HighlightItem;