feat(base): minor syntax and ts types fixes

This commit is contained in:
Calin-Teodor
2024-10-16 15:47:33 +03:00
committed by Calinteodor
parent 2b8cc89df0
commit 2b719743d3
2 changed files with 7 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { Text, TouchableHighlight, View } from 'react-native';
import { Text, TextStyle, TouchableHighlight, View, ViewStyle } from 'react-native';
import Icon from '../../icons/components/Icon';
@@ -53,9 +53,9 @@ export default class ToolboxItem extends AbstractToolboxItem<IProps> {
// show both the icon and the label, then these two need to be
// wrapped in a View.
children = (
<View style = { style }>
<View style = { style as ViewStyle }>
{ children }
<Text style = { styles?.labelStyle }>
<Text style = { styles?.labelStyle as TextStyle }>
{ this.label }
</Text>
{ elementAfter }
@@ -70,11 +70,11 @@ export default class ToolboxItem extends AbstractToolboxItem<IProps> {
return (
<TouchableHighlight
accessibilityLabel = { this.accessibilityLabel }
accessibilityRole = 'button'
accessibilityRole = { 'button' }
accessibilityState = {{ 'selected': Boolean(toggled) }}
disabled = { disabled }
onPress = { onClick }
style = { style }
style = { style as ViewStyle }
underlayColor = { styles?.underlayColor } >
{ children }
</TouchableHighlight>

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { TouchableHighlight } from 'react-native';
import { TouchableHighlight, ViewStyle } from 'react-native';
import Icon from '../../../icons/components/Icon';
import styles from '../../../react/components/native/styles';
@@ -58,7 +58,7 @@ const IconButton: React.FC<IIconButtonProps> = ({
style = { [
iconButtonContainerStyles,
style
] }
] as ViewStyle }
underlayColor = { underlayColor }>
<Icon
color = { color }