@yusr_systems/ui 3.1.4 → 3.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +6 -2
- package/dist/yusr-ui.js +1750 -1754
- package/package.json +1 -2
package/dist/index.d.ts
CHANGED
|
@@ -863,11 +863,15 @@ declare interface Props_2 {
|
|
|
863
863
|
permissions: ResourcePermissions;
|
|
864
864
|
}
|
|
865
865
|
|
|
866
|
-
export declare function ProtectedRoute({ isAuthenticated,
|
|
866
|
+
export declare function ProtectedRoute({ isAuthenticated, children, fallback, onUnauthenticated, }: ProtectedRouteProps): JSX.Element;
|
|
867
867
|
|
|
868
868
|
declare interface ProtectedRouteProps {
|
|
869
869
|
isAuthenticated: boolean;
|
|
870
|
-
|
|
870
|
+
children: default_2.ReactNode;
|
|
871
|
+
/** Optional: What to show while redirecting (e.g., a loader or "Access Denied") */
|
|
872
|
+
fallback?: default_2.ReactNode;
|
|
873
|
+
/** Optional: Function to trigger the redirect based on your framework */
|
|
874
|
+
onUnauthenticated?: () => void;
|
|
871
875
|
}
|
|
872
876
|
|
|
873
877
|
export declare function SaveButton<T extends BaseEntity>({ formData, dialogMode, service, disable, onSuccess, validate }: SaveButtonProps<T>): JSX.Element;
|