akveo / akveo/react-native-ui-kitten

TopNavigation's acessory prop problem in ui-kitten ^5

未关闭
#1,840 2 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
10.7k
派生
962
PR 合并指标
30 天内没有已合并 PR

描述

## 🐛 Bug Report

I'm trying to apply a `ReactElement` to my `TopNavigation's` `accessoryLeft` prop, but it wont accept it unless I make it a `() => ReactElement` though the node_modules says otherwise, even with this code error, it runs just fine.
This wouldn't be a huge problem but, when using the arrow function, the component doesn't respect the TopNavigation's placement or the screen space, just like it was 'absolute'.

### Here's the code:
![image](https://github.com/user-attachments/assets/3bb73144-d170-429d-a62b-8c605c532804)
![1](https://github.com/user-attachments/assets/a12c23ae-b3ba-42a8-bfaa-e55a3950c782)

### Here's the error:
![image](https://github.com/user-attachments/assets/66499d86-5d9a-43ec-a7c5-94b2c965e10d)

### Here's the node_modules:
![image](https://github.com/user-attachments/assets/b961b5fa-c7c7-4a82-9e1e-348ebfcd3aae)

### Here's the same component, using `() => ReactElement`
![image](https://github.com/user-attachments/assets/3c800cb4-fcd0-4da1-a41d-3ab2085000e8)
![2](https://github.com/user-attachments/assets/353330f3-d0f1-4234-9ee8-89dded9d3542)

## Expected behavior

It should work fine using the `ReactElement`, just as it does with `() => ReactElement`, respecting the screen space and TopNavigation's position.

## UI Kitten and Eva version

| Package | Version |
| ----------- | ----------- |
| @eva-design/eva | ^2.2.0 |
| @ui-kitten/components | 5.3.1 |

## Environment information
System:
OS: Linux 6.9 Pop!_OS 22.04 LTS
CPU: (8) x64 Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz
Binaries:
Node: 20.0.0 - ~/.nvm/versions/node/v20.0.0/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 9.6.4 - ~/.nvm/versions/node/v20.0.0/bin/npm
npmPackages:
react: 18.3.1 => 18.3.1
react-native: 0.76.3 => 0.76.3

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。