palantir/blueprint

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

开放

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

 (3 条评论) (0 个反应) (0 位负责人)TypeScript (2,167 个派生)batch import
Domain: APIP3Package: coreType: feature requesthelp wanted

仓库指标

星标
 (20,263 个星标)
PR 合并指标
 (平均合并 43天 10小时) (30 天内合并 27 个 PR)

描述

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.

贡献者指南