mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
refactor(demo-app): improve sign-out button in demo-app
This commit is contained in:
parent
b9bb78521d
commit
3a9d95ed3e
2 changed files with 9 additions and 1 deletions
|
@ -75,6 +75,10 @@
|
|||
cursor: pointer;
|
||||
background: var(--color-hover);
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: 3px solid var(--color-focused-variant);
|
||||
}
|
||||
}
|
||||
|
||||
.continue {
|
||||
|
|
|
@ -81,7 +81,11 @@ const Main = () => {
|
|||
tabIndex={0}
|
||||
className={styles.button}
|
||||
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')}
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue