Vonage / vivid-react

Typescript friendly Reactjs :atom: wrappers/bindings for Vonage's web UI 🎨 toolbelt
https://www.npmjs.com/package/@vonage/vivid-react
5 stars 3 forks source link

Conflicting static and runtime types for VwcMenu corner property. #38

Closed andrii-vonage closed 2 years ago

andrii-vonage commented 2 years ago

Runtime exception

Warning: Failed prop type: Invalid prop `corner` of value `BOTTOM_RIGHT` supplied to `ForwardRef`, expected one of ["top_left","top_right","bottom_left","bottom_right","top_start","top_end","bottom_start","bottom_end"].

TS error

Type '"bottom_right"' is not assignable to type '"TOP_LEFT" | "TOP_RIGHT" | "BOTTOM_LEFT" | "BOTTOM_RIGHT" | "TOP_START" | "TOP_END" | "BOTTOM_START" | "BOTTOM_END" | undefined'.ts(2322)

The expected type comes from property 'corner' which is declared here on type 'IntrinsicAttributes & { children?: ReactNode; slot?: string | undefined; style?: CSSProperties | undefined; ref?: RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined; ... 21 more ...; listElement?: any; }'

Screen recording

k-paxian commented 2 years ago

Please check out the latest version, let me know if it helps