From a10bac4bb4d93d492396c0cd61e415e34ef50aa4 Mon Sep 17 00:00:00 2001 From: Yusef Almamari Date: Tue, 12 Nov 2024 20:02:25 +0400 Subject: [PATCH] Remake Divider component --- src/components/ui/MaterialComponents.jsx | 29 ++++++++++++------------ 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/components/ui/MaterialComponents.jsx b/src/components/ui/MaterialComponents.jsx index eb9c23e..d2a0e56 100644 --- a/src/components/ui/MaterialComponents.jsx +++ b/src/components/ui/MaterialComponents.jsx @@ -7,23 +7,26 @@ import { useMetaThemeColor, useTheme } from "../../hooks/hooks.tsx"; import { hslToHsla } from "../../utils/conversionUtils.tsx"; import { colors as colorValues } from "../../assets/json/defaults.json"; -export function Divider({ className = "", label, ...rest }) { - if (label) - return ( -
- +export function Divider({ className = "", label = "", ...rest }) { + const dividerClass = "h-[1px] w-full"; + const dividerStyle = { background: "var(--md-sys-color-outline-variant)" }; + + return ( +
+
+ {Boolean(label.length) && (

{label}

- -
- ); - return ; + )} +
+
+ ); } export function CircularProgress({ className = "", value, ...rest }) { @@ -46,6 +49,7 @@ export function LinearProgress({ className = "", value, indeterminateWithValue = return ; } +// TODO: Remake this component from scratch export const TextField = forwardRef(function TextField(props, parentRef) { const { className = "", @@ -289,6 +293,7 @@ export function OutlinedIconButton({ className = "", onClick, type = "button", n ); } +// TODO: Remake this component from scratch export function List({ items = [], className = "", ...rest }) { return ( @@ -403,8 +408,6 @@ export const Select = forwardRef(function Select(props, parentRef) { {label}
- {/* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */} - {/* Select Display */}