Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Mati-Educa opened this issue Mar 25, 2024 · 0 comments · Fixed by #3571
Closed

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

Mati-Educa opened this issue Mar 25, 2024 · 0 comments · Fixed by #3571
Labels
triage New issues

Comments

@Mati-Educa
Copy link

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
Labels
triage New issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant