Andarist / Andarist/react-textarea-autosize

`style` prop type error

オープン
#269 コメント 11 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
2.4k
フォーク
247
PR マージ指標
30日以内にマージされた PR はありません

説明

If I just try to pass text area attributes (from `React.InputHTMLAttributes`) to `TextareaAutosize` there is a type error that `height` property of `style` does not match.
```
type Props = React.InputHTMLAttributes;
const Component: React.FC = props => ;
```

Here is the full error:

```
Type '{ accept?: string | undefined; alt?: string | undefined; autoComplete?: string | undefined; autoFocus?: boolean | undefined; capture?: string | boolean | undefined; checked?: boolean | undefined; ... 279 more ...; css?: InterpolationWithTheme<...>; }' is not assignable to type 'Pick'.
Types of property 'style' are incompatible.
Type 'CSSProperties | undefined' is not assignable to type '(CSSProperties & Pick & { ...; }) | undefined'.
Type 'CSSProperties' is not assignable to type 'CSSProperties & Pick & { ...; }'.
Type 'CSSProperties' is not assignable to type '{ height?: number | undefined; }'.
Types of property 'height' are incompatible.
Type 'string | number | undefined' is not assignable to type 'number | undefined'.
Type 'string' is not assignable to type 'number | undefined'. TS2322
```

I don't feel like I should be getting an error there.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。