Custom component for `CopilotStep` text prop

Đang mở
#342 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
38/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
react-native, typescript
Lĩnh vực
mobile

Hướng nghiên cứu

Bắt đầu bằng cách xem xét các khai báo Step và Props trong node_modules/react-native-copilot/dist/index.d.ts và so sánh chúng với patch được cung cấp. Xác nhận rằng CopilotStep có thể chấp nhận một component React làm giá trị văn bản và rằng các khai báo đã phát hành thể hiện điều này một cách nhất quán.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
2.4k
Fork
425
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của mohebifar/react-native-copilot

Tất cả issue của mohebifar/react-native-copilot

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.