mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-22 02:58:33 +00:00
refactor(nui): Styling and sizing changes
This commit is contained in:
1 parent
5a556f3764
commit
3148ef6b1f
6 files changed
+27
-8
No files matched your search
@@ -12,6 +12,7 @@ import { fetchNui } from "../utils/fetchNui";
|
||||
interface Props {
|
||||
duration: number;
|
||||
position?: "middle" | "bottom";
|
||||
percent?: boolean;
|
||||
}
|
||||
|
||||
debugData([
|
||||
@@ -74,9 +75,11 @@ const CircleProgressbar: React.FC = () => {
|
||||
<ScaleFade in={visible} unmountOnExit>
|
||||
<CircularProgress
|
||||
value={value}
|
||||
size="7rem"
|
||||
size="5rem"
|
||||
trackColor="rgba(0, 0, 0, 0.6)"
|
||||
onAnimationEnd={progressComplete}
|
||||
color={cancelled ? "rgb(198, 40, 40)" : "blue.400"}
|
||||
thickness={6}
|
||||
color={cancelled ? "rgb(198, 40, 40)" : "white"}
|
||||
sx={
|
||||
!cancelled
|
||||
? {
|
||||
@@ -95,7 +98,9 @@ const CircleProgressbar: React.FC = () => {
|
||||
}
|
||||
}
|
||||
>
|
||||
<CircularProgressLabel color="black">{value}%</CircularProgressLabel>
|
||||
<CircularProgressLabel fontFamily="Fira Mono">
|
||||
{value}%
|
||||
</CircularProgressLabel>
|
||||
</CircularProgress>
|
||||
</ScaleFade>
|
||||
</Flex>
|
||||
|
||||
@@ -67,8 +67,10 @@ const Progressbar: React.FC = () => {
|
||||
<Progress
|
||||
value={100}
|
||||
height="2.8rem"
|
||||
borderRadius="sm"
|
||||
fontFamily="Inter"
|
||||
flex="1 1 auto"
|
||||
boxShadow="lg"
|
||||
onAnimationEnd={progressComplete}
|
||||
sx={
|
||||
!cancelled
|
||||
@@ -76,6 +78,7 @@ const Progressbar: React.FC = () => {
|
||||
// really scuffed solution but works, wonder if there's a better way to do this?
|
||||
"> div:first-of-type": {
|
||||
animation: `progress-bar linear ${duration}ms`,
|
||||
borderRadius: "none",
|
||||
},
|
||||
}
|
||||
: {
|
||||
@@ -86,7 +89,9 @@ const Progressbar: React.FC = () => {
|
||||
}
|
||||
}
|
||||
>
|
||||
<ProgressLabel fontSize={20}>{label}</ProgressLabel>
|
||||
<ProgressLabel fontSize={22} fontWeight="light">
|
||||
{label}
|
||||
</ProgressLabel>
|
||||
</Progress>
|
||||
</ScaleFade>
|
||||
</Box>
|
||||
|
||||
@@ -48,7 +48,14 @@ const TextUI: React.FC = () => {
|
||||
}
|
||||
>
|
||||
<ScaleFade in={visible} unmountOnExit>
|
||||
<Box bg="blue.400" p={3} fontFamily="Poppins" style={data.style}>
|
||||
<Box
|
||||
bg="gray.700"
|
||||
boxShadow="lg"
|
||||
p={3}
|
||||
fontFamily="Poppins"
|
||||
style={data.style}
|
||||
borderRadius="md"
|
||||
>
|
||||
<Text>{data.text}</Text>
|
||||
</Box>
|
||||
</ScaleFade>
|
||||
|
||||
Reference in new issue
Block a user