mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: better jump buttons
This commit is contained in:
1 parent
46457a8bdc
commit
62f6aabf05
2 files changed
+16
-8
No files matched your search
@@ -5,7 +5,14 @@ import {
|
|||||||
CaretRightIcon,
|
CaretRightIcon,
|
||||||
MagnifyingGlassIcon,
|
MagnifyingGlassIcon,
|
||||||
} from '@radix-ui/react-icons';
|
} from '@radix-ui/react-icons';
|
||||||
import { Button, Dialog, Flex, Select, TextField } from '@radix-ui/themes';
|
import {
|
||||||
|
Button,
|
||||||
|
Dialog,
|
||||||
|
Flex,
|
||||||
|
Select,
|
||||||
|
Text,
|
||||||
|
TextField,
|
||||||
|
} from '@radix-ui/themes';
|
||||||
import { produce } from 'immer';
|
import { produce } from 'immer';
|
||||||
import { debounce, findLastIndex, range } from 'lodash';
|
import { debounce, findLastIndex, range } from 'lodash';
|
||||||
import { ChangeEvent, useEffect, useRef, useState } from 'react';
|
import { ChangeEvent, useEffect, useRef, useState } from 'react';
|
||||||
@@ -304,10 +311,11 @@ export default function Page() {
|
|||||||
</Select.Root>
|
</Select.Root>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
<Flex gap="2" justify="center" wrap="wrap">
|
<Flex gap="3" justify="center" wrap="wrap" align="center">
|
||||||
|
<Text>Jump to:</Text>
|
||||||
<Dialog.Root open={jumpToScoreOpen} onOpenChange={setJumpToScoreOpen}>
|
<Dialog.Root open={jumpToScoreOpen} onOpenChange={setJumpToScoreOpen}>
|
||||||
<Dialog.Trigger>
|
<Dialog.Trigger>
|
||||||
<Button variant="soft">Jump to score</Button>
|
<Button variant="ghost">Score</Button>
|
||||||
</Dialog.Trigger>
|
</Dialog.Trigger>
|
||||||
|
|
||||||
<Dialog.Content>
|
<Dialog.Content>
|
||||||
@@ -342,7 +350,7 @@ export default function Page() {
|
|||||||
onOpenChange={setJumpToPositionOpen}
|
onOpenChange={setJumpToPositionOpen}
|
||||||
>
|
>
|
||||||
<Dialog.Trigger>
|
<Dialog.Trigger>
|
||||||
<Button variant="soft">Jump to position</Button>
|
<Button variant="ghost">Position</Button>
|
||||||
</Dialog.Trigger>
|
</Dialog.Trigger>
|
||||||
|
|
||||||
<Dialog.Content>
|
<Dialog.Content>
|
||||||
@@ -374,11 +382,11 @@ export default function Page() {
|
|||||||
|
|
||||||
<Dialog.Root>
|
<Dialog.Root>
|
||||||
<Dialog.Trigger>
|
<Dialog.Trigger>
|
||||||
<Button variant="soft">Jump to league</Button>
|
<Button variant="ghost">League</Button>
|
||||||
</Dialog.Trigger>
|
</Dialog.Trigger>
|
||||||
|
|
||||||
<Dialog.Content>
|
<Dialog.Content>
|
||||||
<Flex direction="column" gap="2">
|
<Flex gap="2" justify="center">
|
||||||
<Select.Root
|
<Select.Root
|
||||||
value={`${jumpToLeague}`}
|
value={`${jumpToLeague}`}
|
||||||
onValueChange={(value) => setJumpToLeague(parseInt(value))}
|
onValueChange={(value) => setJumpToLeague(parseInt(value))}
|
||||||
@@ -427,7 +435,7 @@ export default function Page() {
|
|||||||
|
|
||||||
<Dialog.Root>
|
<Dialog.Root>
|
||||||
<Dialog.Trigger>
|
<Dialog.Trigger>
|
||||||
<Button variant="soft">Jump to player</Button>
|
<Button variant="ghost">Player</Button>
|
||||||
</Dialog.Trigger>
|
</Dialog.Trigger>
|
||||||
|
|
||||||
<Dialog.Content>
|
<Dialog.Content>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export default function PageWrapper({
|
|||||||
display: 'flex',
|
display: 'flex',
|
||||||
padding: 16,
|
padding: 16,
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
gap: 16,
|
gap: 32,
|
||||||
boxSizing: 'border-box',
|
boxSizing: 'border-box',
|
||||||
|
|
||||||
...style,
|
...style,
|
||||||
|
|||||||
Reference in new issue
Block a user