mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-03 06:28:53 +00:00
refactor(nui): Improve resource text handling
This commit is contained in:
1 parent
d74cefbc7d
commit
e9721ca5ca
1 file changed
+8
-12
@@ -1,4 +1,4 @@
|
|||||||
import { Box, VStack } from '@chakra-ui/react';
|
import { Box, VStack, Text } from '@chakra-ui/react';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { useNuiEvent } from '../../hooks/useNuiEvent';
|
import { useNuiEvent } from '../../hooks/useNuiEvent';
|
||||||
@@ -15,17 +15,13 @@ const LeftBar: React.FC = () => {
|
|||||||
<Box p="1.2vh" fontSize="1.5vh" float="left" w="13%" height="90%" overflowY="scroll">
|
<Box p="1.2vh" fontSize="1.5vh" float="left" w="13%" height="90%" overflowY="scroll">
|
||||||
<VStack align="left">
|
<VStack align="left">
|
||||||
{initData.resources.map((resource, index) => (
|
{initData.resources.map((resource, index) => (
|
||||||
<Link to={resource} key={`${resource}-${index}`}>
|
<Box isTruncated key={`${resource}-${index}`}>
|
||||||
<Box
|
<Link to={resource}>
|
||||||
_hover={{ transform: 'scale(1.1)', color: 'white' }}
|
<Text _hover={{ color: 'white' }} color="grey">
|
||||||
color="grey"
|
{resource}
|
||||||
textOverflow="ellipsis"
|
</Text>
|
||||||
overflow="hidden"
|
</Link>
|
||||||
whiteSpace="nowrap"
|
</Box>
|
||||||
>
|
|
||||||
{resource}
|
|
||||||
</Box>
|
|
||||||
</Link>
|
|
||||||
))}
|
))}
|
||||||
</VStack>
|
</VStack>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
Reference in new issue
Block a user