chore: fix ts errors
This commit is contained in:
parent
9f43ed49c0
commit
687732205f
|
@ -124,8 +124,8 @@ const CollapsibleQuote = React.memo(
|
|||
};
|
||||
|
||||
let {
|
||||
borderColor,
|
||||
chatComponentBackground: backgroundColor,
|
||||
strokeExtraLight,
|
||||
surfaceTint: backgroundColor,
|
||||
strokeLight,
|
||||
strokeDark,
|
||||
fontSecondaryInfo
|
||||
|
@ -134,7 +134,7 @@ const CollapsibleQuote = React.memo(
|
|||
try {
|
||||
if (attachment.color) {
|
||||
backgroundColor = transparentize(attachment.color, 0.8);
|
||||
borderColor = attachment.color;
|
||||
strokeExtraLight = attachment.color;
|
||||
strokeLight = attachment.color;
|
||||
strokeDark = attachment.color;
|
||||
fontSecondaryInfo = fontSecondaryInfo;
|
||||
|
@ -155,9 +155,9 @@ const CollapsibleQuote = React.memo(
|
|||
{
|
||||
backgroundColor,
|
||||
borderLeftColor: strokeLight,
|
||||
borderTopColor: borderColor,
|
||||
borderRightColor: borderColor,
|
||||
borderBottomColor: borderColor,
|
||||
borderTopColor: strokeExtraLight,
|
||||
borderRightColor: strokeExtraLight,
|
||||
borderBottomColor: strokeExtraLight,
|
||||
borderLeftWidth: 2
|
||||
}
|
||||
]}
|
||||
|
|
|
@ -223,9 +223,9 @@ const Reply = React.memo(
|
|||
openLink(url, theme);
|
||||
};
|
||||
|
||||
let { borderColor } = themes[theme];
|
||||
let { strokeExtraLight } = themes[theme];
|
||||
if (attachment.color) {
|
||||
borderColor = attachment.color;
|
||||
strokeExtraLight = attachment.color;
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -239,7 +239,7 @@ const Reply = React.memo(
|
|||
index > 0 && styles.marginTop,
|
||||
msg && styles.marginBottom,
|
||||
{
|
||||
borderColor
|
||||
borderColor: strokeExtraLight
|
||||
}
|
||||
]}
|
||||
background={Touchable.Ripple(themes[theme].surfaceNeutral)}
|
||||
|
|
|
@ -66,6 +66,7 @@ export type ChatsStackParamList = {
|
|||
isSearch?: boolean;
|
||||
onSearch?: (text: string) => Promise<TDataSelect[] | any>;
|
||||
isRadio?: boolean;
|
||||
fontHint?: string;
|
||||
};
|
||||
RoomInfoView: {
|
||||
room?: ISubscription;
|
||||
|
|
|
@ -87,7 +87,7 @@ const DisplayPrefsView = (): React.ReactElement => {
|
|||
};
|
||||
|
||||
const renderCheckBox = (value: boolean) => (
|
||||
<List.Icon name={value ? 'checkbox-checked' : 'checkbox-unchecked'} color={value ? colors.strokeHighlight : null} />
|
||||
<List.Icon name={value ? 'checkbox-checked' : 'checkbox-unchecked'} color={value ? colors.strokeHighlight : ''} />
|
||||
);
|
||||
|
||||
const renderAvatarSwitch = (value: boolean) => (
|
||||
|
|
|
@ -517,7 +517,7 @@ class RoomInfoEditView extends React.Component<IRoomInfoEditViewProps, IRoomInfo
|
|||
encrypted
|
||||
} = this.state;
|
||||
const { serverVersion, encryptionEnabled, theme } = this.props;
|
||||
const { dangerColor } = themes[theme];
|
||||
const { buttonBackgroundDangerDefault, fontDanger } = themes[theme];
|
||||
|
||||
return (
|
||||
<KeyboardView
|
||||
|
@ -723,13 +723,13 @@ class RoomInfoEditView extends React.Component<IRoomInfoEditViewProps, IRoomInfo
|
|||
archived
|
||||
? !permissions['unarchive-room'] && sharedStyles.opacity5
|
||||
: !permissions['archive-room'] && sharedStyles.opacity5,
|
||||
{ flex: 1, marginLeft: 10, borderColor: dangerColor }
|
||||
{ flex: 1, marginLeft: 10, borderColor: buttonBackgroundDangerDefault }
|
||||
]}
|
||||
onPress={this.toggleArchive}
|
||||
disabled={archived ? !permissions['unarchive-room'] : !permissions['archive-room']}
|
||||
testID={archived ? 'room-info-edit-view-unarchive' : 'room-info-edit-view-archive'}
|
||||
>
|
||||
<Text style={[styles.button, styles.button_inverted, { color: dangerColor }]}>
|
||||
<Text style={[styles.button, styles.button_inverted, { color: fontDanger }]}>
|
||||
{archived ? I18n.t('UNARCHIVE') : I18n.t('ARCHIVE')}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
|
@ -740,14 +740,14 @@ class RoomInfoEditView extends React.Component<IRoomInfoEditViewProps, IRoomInfo
|
|||
styles.buttonContainer_inverted,
|
||||
styles.buttonContainerLastChild,
|
||||
styles.buttonDanger,
|
||||
{ borderColor: dangerColor },
|
||||
{ borderColor: buttonBackgroundDangerDefault },
|
||||
!this.hasDeletePermission() && sharedStyles.opacity5
|
||||
]}
|
||||
onPress={room.teamMain ? this.deleteTeam : this.delete}
|
||||
disabled={!this.hasDeletePermission()}
|
||||
testID='room-info-edit-view-delete'
|
||||
>
|
||||
<Text style={[styles.button, styles.button_inverted, { color: dangerColor }]} accessibilityRole='button'>
|
||||
<Text style={[styles.button, styles.button_inverted, { color: fontDanger }]} accessibilityRole='button'>
|
||||
{I18n.t('DELETE')}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
|
|
|
@ -46,7 +46,7 @@ interface ISelectListViewProps {
|
|||
class SelectListView extends React.Component<ISelectListViewProps, ISelectListViewState> {
|
||||
private title: string;
|
||||
|
||||
private infoText: string;
|
||||
private fontHint: string;
|
||||
|
||||
private nextAction: (selected: string[]) => void;
|
||||
|
||||
|
|
Loading…
Reference in New Issue