Custom component for `CopilotStep` text prop
还没有人认领这个 Issue。
评估
- 难度
- 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
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
mohebifar/react-native-copilot 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 72/100
mohebifar/react-native-copilot#354 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 55/100
mohebifar/react-native-copilot#351 · 1 条评论 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 35/100
mohebifar/react-native-copilot#349 · 11 条评论 ·
-
难度 4/5 3-5 天 新手友好度 15/100
mohebifar/react-native-copilot#348 · 2 条评论 ·
查看 mohebifar/react-native-copilot 的全部 Issue
相似的 Issue
-
Resources: New templates of Beijing Subway可能已有人在做 @rmt-svc 今天认领。 未关闭resources
难度 2/5 1-3 小时 新手友好度 68/100
railmapgen/rmg-templates#2726 ·
维护者通常 1 天内回复
-
needs triage
难度 2/5 1-3 小时 新手友好度 76/100
homarr-labs/homarr#7729 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
Buzzpy/Dev-Encyclopedia#218 ·
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
prio:low status:done type:content
难度 2/5 1-3 小时 新手友好度 72/100
davidsneighbour/samui-samui.de#1925 ·