Skip to content

Commit 283befb

Browse files
committed
fix(auth-ui): fix styling regression
1 parent 6616fb9 commit 283befb

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

services/auth-ui/src/supertokens.ts

+14-11
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ import Session from "supertokens-auth-react/recipe/session";
66

77
import { fetchConfig } from "./config";
88

9+
const style = `
10+
[data-supertokens~=container] {
11+
--palette-primary: 200, 100, 150;
12+
--palette-primaryBorder: 200, 100, 150;
13+
}
14+
15+
[data-supertokens~=superTokensBranding] {
16+
display: none;
17+
}
18+
`;
19+
920
export async function initializeSuperTokens(
1021
callback: () => void,
1122
): Promise<void> {
@@ -33,22 +44,14 @@ export async function initializeSuperTokens(
3344
},
3445
},
3546
recipeList: [
36-
EmailPassword.init({
37-
style: `
38-
[data-supertokens~=container] {
39-
--palette-primary: 200, 100, 150;
40-
--palette-primaryBorder: 200, 100, 150;
41-
}
42-
[data-supertokens~=superTokensBranding] {
43-
display: none;
44-
}
45-
`,
46-
}),
47+
EmailPassword.init(),
4748
EmailVerification.init({
4849
mode: process.env.NODE_ENV === "production" ? "REQUIRED" : "OPTIONAL",
4950
}),
5051
Session.init(),
5152
],
53+
54+
style,
5255
useShadowDom: false,
5356
});
5457

0 commit comments

Comments
 (0)