palantir/blueprint

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

Open

#5,801 创建于 2022年12月13日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)TypeScript (20,263 star) (2,167 fork)batch import
Domain: APIP3Package: coreType: feature requesthelp wanted

描述

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.

贡献者指南