Closed
Description
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
- Go to the documentation: Ionic documentation
- Click on the StackBlitz button: StackBlitz
- Check the class property error.
Screenshots
Operating System
Windows 11
Browser
Chrome & Edge
Version
Version 122.0.6261.131 (Official Build) (64-bit)
Additional Information
No response