feat(chat/polls/native): added ids for tests (#14994)

* feat(chat/polls/navigation): added ids for tests and removed some unused helpers
This commit is contained in:
Calinteodor
2024-08-10 18:02:48 +03:00
committed by GitHub
parent 200228339b
commit a8958019a5
18 changed files with 90 additions and 62 deletions

View File

@@ -21,6 +21,11 @@ interface IProps {
*/
disabled?: boolean;
/**
* ID of the header navigation button.
*/
id?: string;
/**
* Label of the button.
*/
@@ -47,7 +52,7 @@ interface IProps {
twoActions?: boolean;
}
const HeaderNavigationButton = ({ color, disabled, label, onPress, src, style, twoActions }: IProps) => {
const HeaderNavigationButton = ({ color, id, disabled, label, onPress, src, style, twoActions }: IProps) => {
let btnStyle;
let labelStyle;
@@ -70,6 +75,7 @@ const HeaderNavigationButton = ({ color, disabled, label, onPress, src, style, t
src ? (
<IconButton
color = { color }
id = { id }
onPress = { onPress }
size = { 24 }
src = { src }
@@ -80,6 +86,7 @@ const HeaderNavigationButton = ({ color, disabled, label, onPress, src, style, t
) : (
<Button
disabled = { disabled }
id = { id }
labelKey = { label }
labelStyle = { labelStyle }
onClick = { onPress }