Skip to content

Popup: invalid typings for on property #4016

Closed
@daigof

Description

Bug Report

Steps

Use Popup component and try to use the on property as array
<Popup on={['hover', 'click']}

It throws TS error: Type '"hover"' is not assignable to type '"focus"'

Issue may be with prop declaration:

/** Events triggering the popup. */
on?: 'hover' | 'click' | 'focus' | 'hover' | 'click' | 'focus'[]

Expected Result

Expect to use array form of prop with all permitted values

Actual Result

Only can use an array of ['focus'] and not any other

Version

1.1.1

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions