palantir/blueprint

Alert doesn't support usePortal and portalClassName TS definitions, but they work fine

Open

#5801 opened on Dec 13, 2022

View on GitHub
 (3 comments) (0 reactions) (0 assignees)TypeScript (20,263 stars) (2,167 forks)batch import
Domain: APIP3Package: coreType: feature requesthelp wanted

Description

Environment

  • Package version(s): 4.13.0
  • Operating System: Windows 11
  • Browser name and version: Chrome latest

Steps to reproduce

Use the usePortal prop on a Blueprint TSX project. A red error message displays the message Property 'usePortal' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Alert> & Pick<Readonly<IAlertProps>, never> & InexactPartial<...> & InexactPartial<...>'..

The Blueprint docs at https://blueprintjs.com/docs/#core/components/alert and https://github.com/palantir/blueprint/blob/develop/packages/core/src/components/alert/alert.tsx don't mention these two props either. But forcing compilation works and it's clear from DevTools that usePortal works fine.

Contributor guide