microsoft / microsoft/TypeScript

Request: Way to target Compound Components (eg. React) in a theme specifically. (<MyComponent.*>)

未关闭
#62,040 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Awaiting More Feedback Suggestion
主要语言
Go
星标
111k
派生
14.4k
平均合并
1 天 19 小时
30 天内合并 PR
117

描述

Not sure if other libraries offer something similar, but react has this way of building compound components that result in a code like this:

Image

I think this pattern is quite widely adopted, specially in UI component libraries and is quite versatile and powerful.

What I don't like about it that it becomes extremely hard to read

Image

I would like the way to identify the compound components (slot components) - (or compound part of the name / or both) and set different color to them

so I can get something like

Image

or

Image

would this be possible?

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

未指定源文件、测试或入口点。首先确定所请求的主题定位行为是否由 TypeScript 负责,或者它是否属于编辑器或语法高亮项目;完成的标准是复合组件名称或其各个部分可以接收不同的主题颜色。

由索引模型根据 Issue 内容生成。

评估

技术栈
react
领域
tooling
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

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