feat(web/menu): array side scrolling

This commit is contained in:
Luke
2022-07-28 16:40:48 +02:00
committed by Luke
parent 3b9c8c5534
commit 3f33b690e1
3 changed files with 33 additions and 17 deletions

View File

@@ -10,9 +10,10 @@ interface Item {
interface Props {
item: Item;
index: number;
scrollIndex: number;
}
const ListItem = forwardRef<Array<HTMLDivElement | null>, Props>(({ item, index }, ref) => {
const ListItem = forwardRef<Array<HTMLDivElement | null>, Props>(({ item, index, scrollIndex }, ref) => {
return (
<Box
bg="#25262B"
@@ -35,7 +36,7 @@ const ListItem = forwardRef<Array<HTMLDivElement | null>, Props>(({ item, index
<Text color="#909296" textTransform="uppercase" fontSize={12} verticalAlign="middle">
{item.label}
</Text>
<Text>hello</Text>
<Text>{item.value[scrollIndex]}</Text>
</Stack>
<Spacer />
<FontAwesomeIcon icon="arrows-left-right" fontSize={20} color="#909296" />