bem / bem/bem-react

@bem-react/core Proposal withBemMod with type check for mod

Open
#458 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

```tsx
export interface IconFaInstagramProps {
fa?: 'instagram'
}

export const withFaInstagram = withBemMod(cnIcon(), {
fa: 'Instagram' // -> TS not work
}, Icon => props => ());
```

На текущий момент нет как типизации так и подсказок при наборе.
Приходится тратить на это время и внимание (хоть мы и прокинули интерфейс уже...).

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.