Export the IconSource type from react-native-paper

未關閉 適合新手
#5,189 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
72/100
Issue 類型
功能
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
react-native, typescript

研究方向

閱讀套件的公開型別匯出入口,並找出其他元件型別重新匯出的位置。匯出 IconSource,讓 import type { IconSource } from 'react-native-paper' 能夠正常運作,接著執行相關的型別或套件匯出檢查;當使用者無需深層匯入即可從套件根目錄匯入它時,就算完成。

由索引模型根據 Issue 內容生成。

描述

feature request

Is your feature request related to a problem? Please describe.

Most icon props take Paper's IconSource type, but react-native-paper doesn't export it. In 5.x apps imported it from react-native-paper/lib/typescript/components/Icon; in 6.x that path moved to lib/typescript/src/components/Icon, so those imports break on upgrade.

Describe the solution you'd like

import type { IconSource } from 'react-native-paper' works.

Describe alternatives you've considered

type IconSource = React.ComponentProps<typeof Icon>['source'] works today without a deep import.

Additional context

A new export, so it fits a 6.x minor.

主要語言
TypeScript
星號
14.5k
分支
2.3k
平均合併
2 天 12 小時
30 天內合併 PR
22

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

callstack/react-native-paper 的其他 Issue

查看 callstack/react-native-paper 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。