Skip to content

Commit 17ad801

Browse files
authored
Merge pull request #26 from movinsilva/react-class-name-improvements
feat(react): add unique class names for social login buttons
2 parents cfc516a + 26af797 commit 17ad801

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

packages/react/src/components/SignIn/SignIn.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ const SignIn: FC<SignInProps> = (props: SignInProps): ReactElement => {
306306
*/
307307
if (isComponentLoading || isLoading || authContext.isBrandingLoading) {
308308
return (
309-
<div className="circular-progress-holder">
309+
<div className="Box-circularProgressHolder">
310310
<CircularProgress className="circular-progress" />
311311
</div>
312312
);
@@ -322,7 +322,7 @@ const SignIn: FC<SignInProps> = (props: SignInProps): ReactElement => {
322322

323323
return (
324324
<ThemeProvider theme={generateThemeSignIn(componentBranding?.preference.theme)}>
325-
<UISignIn className="asgardeo-sign-in">
325+
<UISignIn className="Box-asgardeoSignIn">
326326
{showLogo && !(isLoading || isComponentLoading) && (
327327
<UISignIn.Image className="asgardeo-sign-in-logo" src={imgUrl} />
328328
)}

packages/react/src/components/SignIn/fragments/BasicAuth.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ const BasicAuth = ({
7171
}
7272

7373
return (
74-
<UISignIn.Paper className="asgardeo-basic-auth-paper">
75-
<UISignIn.Typography title className="basic-auth-title">
74+
<UISignIn.Paper className="Paper-basicAuth">
75+
<UISignIn.Typography title className="Typography-basicAuthTitle">
7676
{t(keys.login.login.heading)}
7777
</UISignIn.Typography>
7878

packages/react/src/components/SignIn/fragments/LoginOptionsBox.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const LoginOptionsBox = ({
5353
handleOnClick,
5454
}: LoginOptionsBoxProps): ReactElement => (
5555
<UISignIn.Button
56+
className={`Button-${socialName.toLowerCase()}`}
5657
social
5758
startIcon={<img className="social-login-img" src={images[socialName]} alt={socialName} />}
5859
onClick={handleOnClick}

packages/react/src/components/SignIn/fragments/basic-auth.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
}
3737
}
3838

39-
.asgardeo-basic-auth-paper {
39+
.Paper-basicAuth {
4040
opacity: 0.5;
4141
animation: fade-in 0.9s ease-in-out forwards;
4242

packages/react/src/components/SignIn/sign-in.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818
$--min-height: 75vh;
1919

20-
.asgardeo-sign-in {
20+
.Box-asgardeoSignIn {
2121
min-width: 350px;
2222
min-height: $--min-height;
2323

@@ -38,7 +38,7 @@ $--min-height: 75vh;
3838
}
3939
}
4040

41-
.circular-progress-holder {
41+
.Box-circularProgressHolder {
4242
display: flex;
4343
justify-content: center;
4444
align-items: center;

0 commit comments

Comments
 (0)