You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some components like Panel are showing errors when attributes like children are supplied. I'd suggest providing the HTMLAttributes<HTMLDivElement> type alongside the basic StandardProps; I'm happy to look through which ones need updating as a contributor.
ERROR: Type '{ children: (string | Element)[]; classModifiers: string; title: string; }' is not assignable to type 'IntrinsicAttributes & StandardProps & { title: string; }'.
The text was updated successfully, but these errors were encountered:
@happy-devs: Sorry I missed this. I think this appears in newer versions of React. (What version are you on?)
Obviously, we will need to update the code to explicitly declare when children are valid. I'm not yet certain of the best approach for doing that across the board.
In the case of the Panel component, I agree we should allow all of the <div> attributes and so use HTMLAttributes<HTMLDivElement>.
Feel free to raise a PR, or I'll add it to my to-do list.
Some components like Panel are showing errors when attributes like children are supplied. I'd suggest providing the
HTMLAttributes<HTMLDivElement>
type alongside the basicStandardProps
; I'm happy to look through which ones need updating as a contributor.NotGovUK/components/panel/src/Panel.tsx
Lines 6 to 9 in ff61068
ERROR:
Type '{ children: (string | Element)[]; classModifiers: string; title: string; }' is not assignable to type 'IntrinsicAttributes & StandardProps & { title: string; }'.
The text was updated successfully, but these errors were encountered: