bem / bem/bem-react

@bem-react/classname Proposal generic type for component in generator

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

Description

More info: https://github.com/bem/bem-react/issues/446#issuecomment-510539095, https://github.com/bem/bem-react/issues/446#issuecomment-517455707 and https://github.com/bem/bem-react/issues/446#issuecomment-517469359

Example:

```tsx
import { cnTheme, Theme as ThemeBase } from '../components/Theme/Theme';
import { withColorDefault } from '../components/Theme/_color/Theme_color_default';

const Theme = compose(
withColorDefault
)(ThemeBase);

({ color: 'default' })} />
// ok

({ color: 'def' })} />
// TS Error

({ color: 'default', size: 'default' })} />
// TS Error
```

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.