|
| 1 | +import type { ViewStyle } from 'react-native'; |
| 2 | + |
| 3 | +import type { FeedbackWidgetStyles } from './FeedbackWidget.types'; |
| 4 | + |
| 5 | +const PURPLE = 'rgba(88, 74, 192, 1)'; |
| 6 | +const FOREGROUND_COLOR = '#2b2233'; |
| 7 | +const BACKGROUND_COLOR = '#ffffff'; |
| 8 | +const BORDER_COLOR = 'rgba(41, 35, 47, 0.13)'; |
| 9 | + |
| 10 | +const defaultStyles: FeedbackWidgetStyles = { |
| 11 | + container: { |
| 12 | + flex: 1, |
| 13 | + padding: 20, |
| 14 | + backgroundColor: BACKGROUND_COLOR, |
| 15 | + }, |
| 16 | + title: { |
| 17 | + fontSize: 24, |
| 18 | + fontWeight: 'bold', |
| 19 | + marginBottom: 20, |
| 20 | + textAlign: 'left', |
| 21 | + flex: 1, |
| 22 | + color: FOREGROUND_COLOR, |
| 23 | + }, |
| 24 | + label: { |
| 25 | + marginBottom: 4, |
| 26 | + fontSize: 16, |
| 27 | + color: FOREGROUND_COLOR, |
| 28 | + }, |
| 29 | + input: { |
| 30 | + height: 50, |
| 31 | + borderColor: BORDER_COLOR, |
| 32 | + borderWidth: 1, |
| 33 | + borderRadius: 5, |
| 34 | + paddingHorizontal: 10, |
| 35 | + marginBottom: 15, |
| 36 | + fontSize: 16, |
| 37 | + color: FOREGROUND_COLOR, |
| 38 | + }, |
| 39 | + textArea: { |
| 40 | + height: 100, |
| 41 | + textAlignVertical: 'top', |
| 42 | + color: FOREGROUND_COLOR, |
| 43 | + }, |
| 44 | + screenshotButton: { |
| 45 | + backgroundColor: BACKGROUND_COLOR, |
| 46 | + padding: 15, |
| 47 | + borderRadius: 5, |
| 48 | + alignItems: 'center', |
| 49 | + flex: 1, |
| 50 | + borderWidth: 1, |
| 51 | + borderColor: BORDER_COLOR, |
| 52 | + }, |
| 53 | + screenshotContainer: { |
| 54 | + flexDirection: 'row', |
| 55 | + alignItems: 'center', |
| 56 | + width: '100%', |
| 57 | + marginBottom: 20, |
| 58 | + }, |
| 59 | + screenshotThumbnail: { |
| 60 | + width: 50, |
| 61 | + height: 50, |
| 62 | + borderRadius: 5, |
| 63 | + marginRight: 10, |
| 64 | + }, |
| 65 | + screenshotText: { |
| 66 | + color: FOREGROUND_COLOR, |
| 67 | + fontSize: 16, |
| 68 | + }, |
| 69 | + submitButton: { |
| 70 | + backgroundColor: PURPLE, |
| 71 | + paddingVertical: 15, |
| 72 | + borderRadius: 5, |
| 73 | + alignItems: 'center', |
| 74 | + marginBottom: 10, |
| 75 | + }, |
| 76 | + submitText: { |
| 77 | + color: BACKGROUND_COLOR, |
| 78 | + fontSize: 18, |
| 79 | + }, |
| 80 | + cancelButton: { |
| 81 | + backgroundColor: BACKGROUND_COLOR, |
| 82 | + padding: 15, |
| 83 | + borderRadius: 5, |
| 84 | + alignItems: 'center', |
| 85 | + borderWidth: 1, |
| 86 | + borderColor: BORDER_COLOR, |
| 87 | + }, |
| 88 | + cancelText: { |
| 89 | + color: FOREGROUND_COLOR, |
| 90 | + fontSize: 16, |
| 91 | + }, |
| 92 | + titleContainer: { |
| 93 | + flexDirection: 'row', |
| 94 | + width: '100%', |
| 95 | + }, |
| 96 | + sentryLogo: { |
| 97 | + width: 40, |
| 98 | + height: 40, |
| 99 | + }, |
| 100 | +}; |
| 101 | + |
| 102 | +export const modalWrapper: ViewStyle = { |
| 103 | + position: 'absolute', |
| 104 | + top: 0, |
| 105 | + left: 0, |
| 106 | + right: 0, |
| 107 | + bottom: 0, |
| 108 | +}; |
| 109 | + |
| 110 | +export const modalSheetContainer: ViewStyle = { |
| 111 | + backgroundColor: '#ffffff', |
| 112 | + borderTopLeftRadius: 16, |
| 113 | + borderTopRightRadius: 16, |
| 114 | + overflow: 'hidden', |
| 115 | + alignSelf: 'stretch', |
| 116 | + shadowColor: '#000', |
| 117 | + shadowOffset: { width: 0, height: -3 }, |
| 118 | + shadowOpacity: 0.1, |
| 119 | + shadowRadius: 4, |
| 120 | + elevation: 5, |
| 121 | + flex: 1, |
| 122 | +}; |
| 123 | + |
| 124 | +export const topSpacer: ViewStyle = { |
| 125 | + height: 64, // magic number |
| 126 | +}; |
| 127 | + |
| 128 | +export default defaultStyles; |
0 commit comments