Skip to content

[EuiBadge] Support onClick & href #4530

@parkiino

Description

@parkiino

Type check fails when you have both an onClick prop and an href prop. Even if you are not using iconOnClick, if you have an href prop, type check requires iconOnClick and iconOnClickAriaLabel.

The EuiBadge type is inferred since type check knows it can't be an anchor because there's an onClick and it can't be a button because there's an anchor, so it must be the last type, which is iconOnClick+iconOnClickAriaLabel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions