Custom component for `CopilotStep` text prop

オープン
#342 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
react-native, typescript
領域
mobile

調査の方向性

まず、node_modules/react-native-copilot/dist/index.d.ts 内の Step と Props の宣言を確認し、提供されたパッチと比較します。CopilotStep が React コンポーネントをテキスト値として受け入れられること、および公開された宣言がこれを一貫して表現していることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

Hi! 👋

Is it currently feasible to pass a custom component as the value for the text prop?

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-copilot/dist/index.d.ts b/node_modules/react-native-copilot/dist/index.d.ts
index 8b9d6e7..ea8e4d7 100644
--- a/node_modules/react-native-copilot/dist/index.d.ts
+++ b/node_modules/react-native-copilot/dist/index.d.ts
@@ -9,7 +9,7 @@ interface Step {
     visible: boolean;
     wrapperRef: React.RefObject<NativeMethods>;
     measure: () => Promise<LayoutRectangle>;
-    text: string;
+    text: string | React$1.ReactNode
 }
 interface ValueXY {
     x: number;
@@ -49,7 +49,7 @@ declare function walkthroughable<P = any>(WrappedComponent: React__default.Compo
 interface Props {
     name: string;
     order: number;
-    text: string;
+    text: Step["text"];
     children: React__default.ReactElement<any>;
     active?: boolean;
 }

This issue body was partially generated by patch-package.

主要言語
TypeScript
スター
2.4k
フォーク
425
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

mohebifar/react-native-copilot のほかの issue

mohebifar/react-native-copilot の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。