Skip to content

Commit 413fed8

Browse files
committed
fix: add theming and fixed color for durationLabel
1 parent a6ee866 commit 413fed8

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

package/src/components/AttachmentPicker/AttachmentPicker.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,13 @@ const styles = StyleSheet.create({
3535
container: {
3636
flexGrow: 1,
3737
},
38+
durationText: {
39+
fontWeight: 'bold',
40+
},
3841
overlay: {
3942
alignItems: 'flex-end',
4043
flex: 1,
4144
},
42-
timeColor: {
43-
color: 'white',
44-
fontWeight: 'bold',
45-
},
4645
videoView: {
4746
bottom: 5,
4847
display: 'flex',
@@ -86,7 +85,7 @@ const AttachmentVideo: React.FC<AttachmentVideoProps> = (props) => {
8685

8786
const {
8887
theme: {
89-
attachmentPicker: { image, imageOverlay },
88+
attachmentPicker: { durationText, image, imageOverlay },
9089
colors: { overlay, white },
9190
},
9291
} = useTheme();
@@ -113,7 +112,11 @@ const AttachmentVideo: React.FC<AttachmentVideoProps> = (props) => {
113112
)}
114113
<View style={styles.videoView}>
115114
<Recorder height={20} pathFill={white} width={25} />
116-
{videoDuration ? <Text style={styles.timeColor}>{videoDuration}</Text> : null}
115+
{videoDuration ? (
116+
<Text style={[styles.durationText, durationText, { color: white }]}>
117+
{videoDuration}
118+
</Text>
119+
) : null}
117120
</View>
118121
</ImageBackground>
119122
</TouchableOpacity>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export type MarkdownStyle = Partial<{
8080
export type Theme = {
8181
attachmentPicker: {
8282
bottomSheetContentContainer: ViewStyle;
83+
durationText: TextStyle;
8384
errorButtonText: TextStyle;
8485
errorContainer: ViewStyle;
8586
errorText: TextStyle;
@@ -530,6 +531,7 @@ export type Theme = {
530531
export const defaultTheme: Theme = {
531532
attachmentPicker: {
532533
bottomSheetContentContainer: {},
534+
durationText: {},
533535
errorButtonText: {},
534536
errorContainer: {},
535537
errorText: {},

0 commit comments

Comments
 (0)