Skip to content

Commit f3c0d40

Browse files
committed
fix: design issues
1 parent 9105d0f commit f3c0d40

File tree

5 files changed

+21
-22
lines changed

5 files changed

+21
-22
lines changed

package/src/components/MessageInput/components/AttachmentPreview/AttachmentUploadPreviewList.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,9 @@ export const AttachmentUploadPreviewList = (props: AttachmentUploadPreviewListPr
234234
const styles = StyleSheet.create({
235235
flatList: {
236236
overflow: 'visible',
237-
padding: 4,
238237
},
239238
itemSeparator: {
240-
width: 16,
239+
width: 8,
241240
},
242241
wrapper: {},
243242
});

package/src/components/MessageInput/components/AttachmentPreview/FileAttachmentUploadPreview.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export const FileAttachmentUploadPreview = ({
4949
fileSizeText,
5050
fileTextContainer,
5151
uploadProgressOverlay,
52+
wrapper,
5253
},
5354
},
5455
},
@@ -63,7 +64,7 @@ export const FileAttachmentUploadPreview = ({
6364
}, [attachment, removeAttachments]);
6465

6566
return (
66-
<>
67+
<View style={[styles.wrapper, wrapper]} testID={'file-attachment-upload-preview'}>
6768
<AttachmentUploadProgressIndicator
6869
onPress={onRetryHandler}
6970
style={[styles.overlay, uploadProgressOverlay]}
@@ -77,7 +78,6 @@ export const FileAttachmentUploadPreview = ({
7778
},
7879
fileContainer,
7980
]}
80-
testID={'file-attachment-upload-preview'}
8181
>
8282
<View style={styles.fileIcon}>
8383
<FileAttachmentIcon mimeType={attachment.mime_type} size={40} />
@@ -113,12 +113,12 @@ export const FileAttachmentUploadPreview = ({
113113
<View style={styles.dismissWrapper}>
114114
<DismissAttachmentUpload onPress={onDismissHandler} />
115115
</View>
116-
</>
116+
</View>
117117
);
118118
};
119119

120120
const styles = StyleSheet.create({
121-
dismissWrapper: { position: 'absolute', right: -4, top: -4 },
121+
dismissWrapper: { position: 'absolute', right: 0, top: 0 },
122122
fileContainer: {
123123
borderRadius: 12,
124124
borderWidth: 1,
@@ -149,4 +149,7 @@ const styles = StyleSheet.create({
149149
overlay: {
150150
borderRadius: 12,
151151
},
152+
wrapper: {
153+
padding: 4,
154+
},
152155
});

package/src/components/MessageInput/components/AttachmentPreview/ImageAttachmentUploadPreview.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const ImageAttachmentUploadPreview = ({
3232
const {
3333
theme: {
3434
messageInput: {
35-
imageAttachmentUploadPreview: { container, upload },
35+
imageAttachmentUploadPreview: { container, upload, wrapper },
3636
},
3737
},
3838
} = useTheme();
@@ -54,7 +54,7 @@ export const ImageAttachmentUploadPreview = ({
5454
}, []);
5555

5656
return (
57-
<View testID={'image-attachment-upload-preview'}>
57+
<View style={[styles.wrapper, wrapper]} testID={'image-attachment-upload-preview'}>
5858
<AttachmentUploadProgressIndicator
5959
onPress={onRetryHandler}
6060
style={[styles.container, container]}
@@ -88,7 +88,7 @@ const styles = StyleSheet.create({
8888
flexDirection: 'row',
8989
overflow: 'hidden',
9090
},
91-
dismissWrapper: { position: 'absolute', right: -4, top: -4 },
91+
dismissWrapper: { position: 'absolute', right: 0, top: 0 },
9292
fileSizeText: {
9393
fontSize: 12,
9494
paddingHorizontal: 10,
@@ -97,5 +97,7 @@ const styles = StyleSheet.create({
9797
height: IMAGE_PREVIEW_SIZE,
9898
width: IMAGE_PREVIEW_SIZE,
9999
},
100-
wrapper: {},
100+
wrapper: {
101+
padding: 4,
102+
},
101103
});

package/src/components/Reply/Reply.tsx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ export const ReplyWithContext = (props: ReplyPropsWithContext) => {
280280
rightContainer,
281281
title: titleStyle,
282282
subtitleContainer,
283-
subtitleIconContainer,
284283
dismissWrapper,
285284
},
286285
},
@@ -320,9 +319,7 @@ export const ReplyWithContext = (props: ReplyPropsWithContext) => {
320319
{title}
321320
</Text>
322321
<View style={[styles.subtitleContainer, subtitleContainer]}>
323-
<View style={[styles.subtitleIconContainer, subtitleIconContainer]}>
324-
<SubtitleIcon message={quotedMessage} />
325-
</View>
322+
<SubtitleIcon message={quotedMessage} />
326323
<SubtitleText message={quotedMessage} />
327324
</View>
328325
</View>
@@ -429,8 +426,8 @@ const styles = StyleSheet.create({
429426
},
430427
dismissWrapper: {
431428
position: 'absolute',
432-
right: -4,
433-
top: -4,
429+
right: 0,
430+
top: 0,
434431
},
435432
iconStyle: {},
436433
imageAttachment: {},
@@ -464,10 +461,6 @@ const styles = StyleSheet.create({
464461
gap: 4,
465462
paddingTop: 4,
466463
},
467-
subtitleIconContainer: {
468-
alignItems: 'center',
469-
justifyContent: 'center',
470-
},
471464
title: {
472465
color: '#384047',
473466
fontSize: 12,

package/src/contexts/themeContext/utils/theme.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ export type Theme = {
340340
fileSizeText: TextStyle;
341341
fileTextContainer: ViewStyle;
342342
uploadProgressOverlay: ViewStyle;
343+
wrapper: ViewStyle;
343344
};
344345
fileUploadPreview: {
345346
flatList: ViewStyle;
@@ -349,6 +350,7 @@ export type Theme = {
349350
imageAttachmentUploadPreview: {
350351
container: ViewStyle;
351352
upload: ImageStyle;
353+
wrapper: ViewStyle;
352354
};
353355
inputContainer: ViewStyle;
354356
inputBox: TextStyle;
@@ -841,7 +843,6 @@ export type Theme = {
841843
title: TextStyle;
842844
subtitle: TextStyle;
843845
subtitleContainer: ViewStyle;
844-
subtitleIconContainer: ViewStyle;
845846
videoIcon: IconProps;
846847
wrapper: ViewStyle;
847848
};
@@ -1144,6 +1145,7 @@ export const defaultTheme: Theme = {
11441145
fileSizeText: {},
11451146
fileTextContainer: {},
11461147
uploadProgressOverlay: {},
1148+
wrapper: {},
11471149
},
11481150
fileUploadPreview: {
11491151
flatList: {},
@@ -1153,6 +1155,7 @@ export const defaultTheme: Theme = {
11531155
imageAttachmentUploadPreview: {
11541156
container: {},
11551157
upload: {},
1158+
wrapper: {},
11561159
},
11571160
inputBox: {},
11581161
inputBoxContainer: {},
@@ -1659,7 +1662,6 @@ export const defaultTheme: Theme = {
16591662
rightContainer: {},
16601663
subtitle: {},
16611664
subtitleContainer: {},
1662-
subtitleIconContainer: {},
16631665
title: {},
16641666
videoIcon: {},
16651667
wrapper: {},

0 commit comments

Comments
 (0)