0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-27 21:39:16 -05:00

Merge pull request #2115 from logto-io/charles-improve-demo-app-sign-out-button

refactor(demo-app): improve sign-out button in demo-app
This commit is contained in:
Charles Zhao 2022-10-12 10:36:51 +08:00 committed by GitHub
commit 9e57ada14e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -75,6 +75,10 @@
cursor: pointer; cursor: pointer;
background: var(--color-hover); background: var(--color-hover);
} }
&:focus {
outline: 3px solid var(--color-focused-variant);
}
} }
.continue { .continue {

View file

@ -81,7 +81,11 @@ const Main = () => {
tabIndex={0} tabIndex={0}
className={styles.button} className={styles.button}
onClick={async () => signOut(`${window.location.origin}/demo-app`)} onClick={async () => signOut(`${window.location.origin}/demo-app`)}
onKeyDown={async () => signOut(`${window.location.origin}/demo-app`)} onKeyDown={({ key }) => {
if (key === 'Enter' || key === ' ') {
void signOut(`${window.location.origin}/demo-app`);
}
}}
> >
{t('sign_out')} {t('sign_out')}
</div> </div>