// 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'; type ThemeThumbnailProps = { width: number; borderColorBase: string; borderColorMix: string; sidebarBg: string; sidebarText: string; sidebarUnreadText: string; onlineIndicator: string; awayIndicator: string; dndIndicator: string; centerChannelColor: string; centerChannelBg: string; newMessageSeparator: string; buttonBg: string; } function ThemeThumbnail({ width = 180, borderColorBase = '#E0E1E3', borderColorMix = '#E0E1E3', sidebarBg = '#174AB5', sidebarText = '#86A1D9', sidebarUnreadText = 'white', onlineIndicator = '#3DB887', awayIndicator = '#FFBC1F', dndIndicator = '#D24B4E', centerChannelColor = '#E0E1E3', centerChannelBg = 'white', newMessageSeparator = '#1C58D9', buttonBg = '#15B7B7', }: 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;