Skip to content

Commit e615cc6

Browse files
committed
feat: add loading on login card
1 parent 2ec2087 commit e615cc6

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

src/components/login/Login.tsx

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,22 @@ const Login = () => {
127127

128128
const renderSSOLoginPage = () => (
129129
<div className="flexbox-col dc__gap-12 p-36">
130+
{initLoading && !loginList.length && (
131+
<Button
132+
variant={ButtonVariantType.secondary}
133+
text="Checking SSO"
134+
dataTestId="checking-sso"
135+
style={ButtonStyleType.neutral}
136+
startIcon={<Icon name="ic-circle-loader" color={null} />}
137+
fullWidth
138+
size={ComponentSizeType.xl}
139+
disabled
140+
/>
141+
)}
130142
{loginList
131143
.filter((sso) => sso.active)
132144
.map((item) => (
133-
<div className="login-button" key={item.name}>
145+
<div key={item.name}>
134146
<Button
135147
variant={ButtonVariantType.secondary}
136148
text={`Login with ${item.name}`}
@@ -181,22 +193,23 @@ const Login = () => {
181193
)
182194

183195
return (
184-
<div className="full-height-width login dc__grid-half bg__secondary">
196+
<div className="full-height-width dc__grid-half bg__secondary">
185197
<div className="flexbox p-12">
186198
<LoginBanner />
187199
</div>
188200
<div className="flex">
189-
<div className="login-card__wrapper dc__overflow-hidden br-12 mw-420 bg__primary dc__border">
201+
<div className="shadow__overlay dc__overflow-hidden br-12 mw-420 bg__primary dc__border">
190202
<div className="flexbox-col">
191203
{renderDevtronLogo()}
192-
<AnimatePresence initial={false}>
204+
<AnimatePresence>
193205
<MotionDiv
194206
key={location.pathname}
195207
variants={LOGIN_CARD_ANIMATION_VARIANTS}
196208
initial="initial"
197209
animate="animate"
198210
exit="exit"
199211
transition={{ duration: 0.3, ease: [0.4, 0, 0.2, 1] }}
212+
className="dc__overflow-hidden"
200213
>
201214
{renderLoginContent()}
202215
</MotionDiv>

src/components/login/login.scss

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
// Login css
18-
.login {
19-
20-
.login-card__wrapper {
21-
box-shadow: var(--shadow-overlay);
22-
}
23-
24-
.login-button {
25-
.button__secondary--neutral{
26-
color: var(--N900)
27-
}
28-
}
29-
}
30-
3117
// SSO login & GitOps configuration css
3218

3319
.login__btn {

0 commit comments

Comments
 (0)