bem / bem/bem-react

How to write Block_modName-Elem?

Open
#554 3 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
TypeScript
Stars
450
Forks
69
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.