소스 검색

add toast classname prop (#4310)

Carlos 6 달 전
부모
커밋
8a4701143e
2개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      reflex/components/sonner/toast.py
  2. 1 0
      reflex/components/sonner/toast.pyi

+ 3 - 0
reflex/components/sonner/toast.py

@@ -114,6 +114,9 @@ class ToastProps(PropsBase, NoExtrasAllowedProps):
     # Custom style for the toast.
     style: Optional[Style]
 
+    # Class name for the toast.
+    class_name: Optional[str]
+
     # XXX: These still do not seem to work
     # Custom style for the toast primary button.
     action_button_styles: Optional[Style]

+ 1 - 0
reflex/components/sonner/toast.pyi

@@ -45,6 +45,7 @@ class ToastProps(PropsBase, NoExtrasAllowedProps):
     id: Optional[Union[str, Var]]
     unstyled: Optional[bool]
     style: Optional[Style]
+    class_name: Optional[str]
     action_button_styles: Optional[Style]
     cancel_button_styles: Optional[Style]
     on_dismiss: Optional[Any]