Skip to content

Commit dd22299

Browse files
amberkamboj77HVish
andauthored
fix: themeEngine utility documentation update
Co-authored-by: Vishnu Singh <[email protected]>
1 parent cd889fa commit dd22299

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/utils/theme/themeEngine.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ const PRECEDENCE_VARIABLE_MAPPING = {
4949
/**
5050
* Main theme application function
5151
* Applies Auth0 branding data as CSS variables with proper precedence
52+
* USAGE PATTERN:
53+
* ```typescript
54+
* // In any Auth0 screen component
55+
* import { applyAuth0Theme } from "@/utils/theme";
56+
*
57+
* function LoginScreen() {
58+
* const { screenInstance } = useScreenManager();
59+
* applyAuth0Theme(screenInstance); // Apply theme when screen loads
60+
* return <div>...</div>;
61+
* }
62+
* ```
5263
*/
5364
export function applyAuth0Theme(screenInstance: any): void {
5465
if (!screenInstance?.branding) {

0 commit comments

Comments
 (0)