// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. import React from 'react'; import Svg, {Rect, G, Circle} from 'react-native-svg'; import {changeOpacity} from '@utils/theme'; type ThemeThumbnailProps = { borderColorBase: string; borderColorMix: string; theme: Theme; width: number; } const ThemeThumbnail = ({borderColorBase, borderColorMix, theme, width}: ThemeThumbnailProps): JSX.Element => { // the original height of the thumbnail const baseWidth = 180; const baseHeight = 134; // calculate actual height proportionally to base size const height = Math.round((width * baseHeight) / baseWidth); // convenience values of various sub elements of the thumbnail const sidebarWidth = 80; const postsContainerWidth = 100; const spacing = 8; const rowHeight = 6; const rowRadius = rowHeight / 2; const postInputHeight = 10; const postWidth = postsContainerWidth - (spacing * 2); const channelNameWidth = sidebarWidth - (spacing * 3) - (rowHeight * 2); const buttonWidth = postsContainerWidth - (spacing * 8); return ( ); }; export default ThemeThumbnail;