Skip to content

bug: <IonToast> class property has Typescipt issue #3550

Closed

Description

@Mati-Educa

Describe the Bug

When you want to use 'class' property on the IonToast you've got this Typescript error:

Type '{ trigger: string; duration: number; message: string; class: string; buttons: { text: string; role: "cancel"; }[]; }' is not assignable to type 'IntrinsicAttributes & IonToast & Omit<HTMLAttributes<HTMLIonToastElement>, "style" | "placeholder"> & IonicReactProps & RefAttributes<...>'.
  Property 'class' does not exist on type 'IntrinsicAttributes & IonToast & Omit<HTMLAttributes<HTMLIonToastElement>, "style" | "placeholder"> & IonicReactProps & RefAttributes<...>'. Did you mean 'className'?

Documentation: https://ionicframework.com/docs/api/toast#theming

Expected Behavior

You can use the 'class' property without any typescript error.

Steps to Reproduce

  1. Go to the documentation: Ionic documentation
  2. Click on the StackBlitz button: StackBlitz
  3. Check the class property error.

Screenshots

image

Operating System

Windows 11

Browser

Chrome & Edge

Version

Version 122.0.6261.131 (Official Build) (64-bit)

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions