mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-14 13:16:11 +01:00
feat: exit fullscreen
This commit is contained in:
1 parent
e3d69ab83c
commit
381a4fefd9
2 files changed
+24
-4
No files matched your search
@@ -33,11 +33,12 @@ export function HeroSection() {
|
||||
<Flex
|
||||
direction="column"
|
||||
justify="center"
|
||||
gap="4"
|
||||
style={{
|
||||
flex: 1,
|
||||
}}
|
||||
>
|
||||
<Heading size="7">{tank.name}</Heading>
|
||||
<Heading size="9">{tank.name}</Heading>
|
||||
<Text color="gray">
|
||||
Tier {TIER_ROMAN_NUMERALS[tank.tier]}{' '}
|
||||
{(strings.common.nations as Record<string, string>)[tank.nation]}{' '}
|
||||
@@ -93,7 +94,11 @@ export function HeroSection() {
|
||||
right: 16,
|
||||
}}
|
||||
onClick={() => {
|
||||
document.body.requestFullscreen();
|
||||
if (isFullScreen) {
|
||||
document.exitFullscreen();
|
||||
} else {
|
||||
document.body.requestFullscreen();
|
||||
}
|
||||
}}
|
||||
>
|
||||
{isFullScreen ? <ExitFullScreenIcon /> : <EnterFullScreenIcon />}
|
||||
|
||||
Reference in new issue
Block a user