How to write Block_modName-Elem?
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- react, typescript
- 领域
- frontend
调研方向
从 cn('Block') 入口点开始,检查其 TypeScript 类型定义和现有测试(如果有)。复现 issue 中链式修饰符和元素的示例。完成的标准是:支持所请求的 Block_modName-Elem 类组合且不再出现类型错误,并为所示用法提供覆盖。
由索引模型根据 Issue 内容生成。
描述
Please, help me get the class of element that changes its style depending on its block.
const block = cn('Block') // 'Block'
block({ modName: true }) // 'Block Block_modName'
block({ modName: true })('Elem') // Error. Type 'String' has no call signatures
Of course I can use cn('Block_modName')('Elem') but the meaning of the package is lost.
- 主要语言
- TypeScript
- 星标
- 450
- 派生
- 69
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bem/bem-react 的其他 Issue
-
@bem-react/classname: Unclear typing for element-bound class name formatters可能已有人在做 @rrabmig 于 114 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 68/100
-
难度 5/5 一周以上 新手友好度 25/100
-
@bem-react/classname: Can't add modifier with value === 0可能已有人在做 @frontstall 于 934 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 55/100
-
难度 2/5 1-3 小时 新手友好度 52/100
-
@bem-react/pack: support relative imports可能重新可做 @yarastqt 于 2102 天前认领,目前没有进行中的 PR。 未关闭bug scope: pack
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
microsoft/playwright#43327 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
microsoft/TypeScript#64758 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 65/100
opensearch-project/OpenSearch-Dashboards#12937 ·
维护者通常 2 天内回复
-
Liveness marks block-included attesters live in the block's epoch instead of the attestation's epoch未关闭
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
status: needs-triage
难度 2/5 1-3 小时 新手友好度 83/100
a2ui-project/a2ui#3158 ·
维护者通常 2 天内回复