From 5bc3860f211c74dd198ccc5a031559aac9200c31 Mon Sep 17 00:00:00 2001 From: Arshpreet Singh <73437174+GoldGroove06@users.noreply.github.com.> Date: Wed, 11 Dec 2024 13:02:58 +0530 Subject: [PATCH] Util classname 3 --- src/components/ui/Separator/Separator.tsx | 4 ++-- src/components/ui/Skeleton/Skeleton.tsx | 4 ++-- src/components/ui/Strong/Strong.tsx | 4 ++-- src/components/ui/Switch/Switch.tsx | 3 ++- src/components/ui/Table/fragments/TableBody.tsx | 3 ++- src/components/ui/Table/fragments/TableCell.tsx | 3 ++- src/components/ui/Table/fragments/TableColumnCellHeader.tsx | 3 ++- src/components/ui/Table/fragments/TableHead.tsx | 3 ++- src/components/ui/Table/fragments/TableRoot.tsx | 6 +++--- src/components/ui/Table/fragments/TableRow.tsx | 3 ++- src/components/ui/Tabs/fragments/TabContent.tsx | 3 ++- src/components/ui/Tabs/fragments/TabList.tsx | 4 ++-- src/components/ui/Tabs/fragments/TabRoot.tsx | 4 ++-- src/components/ui/Tabs/fragments/TabTrigger.tsx | 4 ++-- src/components/ui/Text/Text.tsx | 5 +++-- src/components/ui/TextArea/TextArea.tsx | 4 ++-- src/components/ui/TextArea/fragments/TextAreaRoot.tsx | 3 ++- src/components/ui/Toggle/Toggle.tsx | 4 ++-- src/components/ui/ToggleGroup/fragments/ToggleGroupRoot.tsx | 4 ++-- src/components/ui/Tree/fragments/TreeItem.tsx | 3 ++- 20 files changed, 42 insertions(+), 32 deletions(-) diff --git a/src/components/ui/Separator/Separator.tsx b/src/components/ui/Separator/Separator.tsx index dea62a6b..7b75e11e 100644 --- a/src/components/ui/Separator/Separator.tsx +++ b/src/components/ui/Separator/Separator.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { customClassSwitcher } from '~/core'; - +import { clsx } from 'clsx'; const COMPONENT_NAME = 'Separator'; export type SeparatorProps = { @@ -14,7 +14,7 @@ const Separator = ({ orientation = 'horizontal', className, customRootClass, ... const rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME); const orientationClass = orientation === 'vertical' ? `${rootClass}-vertical` : `${rootClass}-horizontal`; - return
; + return ; }; Separator.displayName = COMPONENT_NAME; diff --git a/src/components/ui/Skeleton/Skeleton.tsx b/src/components/ui/Skeleton/Skeleton.tsx index 4a9a2f72..a880a2b2 100644 --- a/src/components/ui/Skeleton/Skeleton.tsx +++ b/src/components/ui/Skeleton/Skeleton.tsx @@ -1,7 +1,7 @@ 'use client'; import React from 'react'; import { customClassSwitcher } from '~/core'; - +import { clsx } from 'clsx'; const COMPONENT_NAME = 'Skeleton'; const Skeleton = ({ loading = true, className = '', customRootClass = '', children, ...props }:any) => { @@ -9,7 +9,7 @@ const Skeleton = ({ loading = true, className = '', customRootClass = '', childr if (!loading) return children; const rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME); - return + return {children} ; }; diff --git a/src/components/ui/Strong/Strong.tsx b/src/components/ui/Strong/Strong.tsx index 6089eb0b..983b3faa 100644 --- a/src/components/ui/Strong/Strong.tsx +++ b/src/components/ui/Strong/Strong.tsx @@ -1,5 +1,5 @@ import React from 'react'; - +import { clsx } from 'clsx'; import { customClassSwitcher } from '~/core'; const COMPONENT_NAME = 'Strong'; @@ -12,7 +12,7 @@ export type StrongProps = { const Strong = ({ children, className, customRootClass, ...props }: StrongProps) => { const rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME); return ( - {children} + {children} ); }; diff --git a/src/components/ui/Switch/Switch.tsx b/src/components/ui/Switch/Switch.tsx index 5d7d10c8..059c6547 100644 --- a/src/components/ui/Switch/Switch.tsx +++ b/src/components/ui/Switch/Switch.tsx @@ -1,6 +1,7 @@ 'use client'; import React, { useState } from 'react'; import { customClassSwitcher } from '~/core'; +import { clsx } from 'clsx'; const COMPONENT_NAME = 'Switch'; export type SwitchProps = { @@ -26,7 +27,7 @@ const Switch = ({ children, customRootClass = '', className = '', color = '', de }; return ( <> - + > ); diff --git a/src/components/ui/Table/fragments/TableBody.tsx b/src/components/ui/Table/fragments/TableBody.tsx index 5c41648d..034fdcfd 100644 --- a/src/components/ui/Table/fragments/TableBody.tsx +++ b/src/components/ui/Table/fragments/TableBody.tsx @@ -1,7 +1,8 @@ import React from 'react'; +import { clsx } from 'clsx'; const TableBody = ({ children, className = '', ...props }:any) => { - return + return {children} ; }; diff --git a/src/components/ui/Table/fragments/TableCell.tsx b/src/components/ui/Table/fragments/TableCell.tsx index c7d7cd31..8da94437 100644 --- a/src/components/ui/Table/fragments/TableCell.tsx +++ b/src/components/ui/Table/fragments/TableCell.tsx @@ -1,7 +1,8 @@ import React from 'react'; +import { clsx } from 'clsx'; const TableCell = ({ children, className = 'cell', ...props }:any) => { - return