mirror of
https://github.com/logto-io/logto.git
synced 2025-01-20 21:32:31 -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;
|
cursor: pointer;
|
||||||
background: var(--color-hover);
|
background: var(--color-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
outline: 3px solid var(--color-focused-variant);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.continue {
|
.continue {
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Add table
Reference in a new issue