diff --git a/apps/site/app/[locale]/layout.tsx b/apps/site/app/[locale]/layout.tsx index b1887eea5c80e..9f79198c76b9e 100644 --- a/apps/site/app/[locale]/layout.tsx +++ b/apps/site/app/[locale]/layout.tsx @@ -1,6 +1,6 @@ import { Analytics } from '@vercel/analytics/react'; import { SpeedInsights } from '@vercel/speed-insights/next'; -import classNames from 'classnames'; +import { clsx } from 'clsx'; import type { FC, PropsWithChildren } from 'react'; import BaseLayout from '@/layouts/Base'; @@ -12,7 +12,7 @@ import { ThemeProvider } from '@/providers/themeProvider'; import '@/styles/index.css'; -const fontClasses = classNames(IBM_PLEX_MONO.variable, OPEN_SANS.variable); +const fontClasses = clsx(IBM_PLEX_MONO.variable, OPEN_SANS.variable); type RotLayoutProps = PropsWithChildren<{ params: { locale: string } }>; diff --git a/apps/site/components/Common/ActiveLink/index.tsx b/apps/site/components/Common/ActiveLink/index.tsx index bdf566d87dc71..db2eb8f347938 100644 --- a/apps/site/components/Common/ActiveLink/index.tsx +++ b/apps/site/components/Common/ActiveLink/index.tsx @@ -1,6 +1,6 @@ 'use client'; -import classNames from 'classnames'; +import { clsx } from 'clsx'; import type { ComponentProps, FC } from 'react'; import Link from '@/components/Link'; @@ -21,7 +21,7 @@ const ActiveLink: FC = ({ }) => { const pathname = usePathname(); - const finalClassName = classNames(className, { + const finalClassName = clsx(className, { [activeClassName]: allowSubPath ? // When using allowSubPath we want only to check if // the current pathname starts with the utmost upper level diff --git a/apps/site/components/Common/AvatarGroup/Avatar/index.tsx b/apps/site/components/Common/AvatarGroup/Avatar/index.tsx index c992fab126f5c..d55fa1c4f18f2 100644 --- a/apps/site/components/Common/AvatarGroup/Avatar/index.tsx +++ b/apps/site/components/Common/AvatarGroup/Avatar/index.tsx @@ -1,5 +1,5 @@ import * as RadixAvatar from '@radix-ui/react-avatar'; -import classNames from 'classnames'; +import { clsx } from 'clsx'; import type { ComponentPropsWithoutRef, ElementRef } from 'react'; import { forwardRef } from 'react'; @@ -25,7 +25,7 @@ const Avatar = forwardRef< return ( {fallback} diff --git a/apps/site/components/Common/AvatarGroup/index.tsx b/apps/site/components/Common/AvatarGroup/index.tsx index 87f8765f62a65..da7741558efd7 100644 --- a/apps/site/components/Common/AvatarGroup/index.tsx +++ b/apps/site/components/Common/AvatarGroup/index.tsx @@ -1,6 +1,6 @@ 'use client'; -import classNames from 'classnames'; +import { clsx } from 'clsx'; import type { FC } from 'react'; import { useState, useMemo, Fragment } from 'react'; @@ -46,7 +46,7 @@ const AvatarGroup: FC = ({ = ({ {avatars.length > limit && ( setShowMore(prev => !prev) : undefined} - className={classNames( + className={clsx( avatarstyles.avatar, avatarstyles[size], 'cursor-pointer' diff --git a/apps/site/components/Common/Breadcrumbs/BreadcrumbItem/index.tsx b/apps/site/components/Common/Breadcrumbs/BreadcrumbItem/index.tsx index f78e3718af617..9f0726dad7d3e 100644 --- a/apps/site/components/Common/Breadcrumbs/BreadcrumbItem/index.tsx +++ b/apps/site/components/Common/Breadcrumbs/BreadcrumbItem/index.tsx @@ -1,5 +1,5 @@ import ChevronRightIcon from '@heroicons/react/24/outline/ChevronRightIcon'; -import classNames from 'classnames'; +import { clsx } from 'clsx'; import type { ComponentProps, FC, PropsWithChildren } from 'react'; import styles from './index.module.css'; @@ -24,7 +24,7 @@ const BreadcrumbItem: FC> = ({ itemProp={!disableMicrodata ? 'itemListElement' : undefined} itemScope={!disableMicrodata ? true : undefined} itemType={!disableMicrodata ? 'https://schema.org/ListItem' : undefined} - className={classNames( + className={clsx( styles.item, { [styles.visuallyHidden]: hidden }, props.className diff --git a/apps/site/components/Common/Breadcrumbs/BreadcrumbLink/index.tsx b/apps/site/components/Common/Breadcrumbs/BreadcrumbLink/index.tsx index 93f58ae3a5d96..a98faf1e378c5 100644 --- a/apps/site/components/Common/Breadcrumbs/BreadcrumbLink/index.tsx +++ b/apps/site/components/Common/Breadcrumbs/BreadcrumbLink/index.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import { clsx } from 'clsx'; import type { ComponentProps, FC } from 'react'; import Link from '@/components/Link'; @@ -20,11 +20,7 @@ const BreadcrumbLink: FC = ({ itemProp="item" itemID={href?.toString()} href={href} - className={classNames( - styles.link, - { [styles.active]: active }, - props.className - )} + className={clsx(styles.link, { [styles.active]: active }, props.className)} aria-current={active ? 'page' : undefined} {...props} > diff --git a/apps/site/components/Common/Button/index.tsx b/apps/site/components/Common/Button/index.tsx index cb7f77eed0c89..201b4505aefb4 100644 --- a/apps/site/components/Common/Button/index.tsx +++ b/apps/site/components/Common/Button/index.tsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import { clsx } from 'clsx'; import type { FC, AnchorHTMLAttributes } from 'react'; import Link from '@/components/Link'; @@ -23,7 +23,7 @@ const Button: FC = ({ role="button" href={disabled ? undefined : href} aria-disabled={disabled} - className={classNames(styles.button, styles[kind], className)} + className={clsx(styles.button, styles[kind], className)} {...props} > {children} diff --git a/apps/site/components/Common/CodeBox/index.tsx b/apps/site/components/Common/CodeBox/index.tsx index 0b6d97df48ca1..b3be78773b9f0 100644 --- a/apps/site/components/Common/CodeBox/index.tsx +++ b/apps/site/components/Common/CodeBox/index.tsx @@ -4,7 +4,7 @@ import { DocumentDuplicateIcon, CodeBracketIcon, } from '@heroicons/react/24/outline'; -import classNames from 'classnames'; +import { clsx } from 'clsx'; import { useTranslations } from 'next-intl'; import type { FC, PropsWithChildren, ReactNode } from 'react'; import { Fragment, isValidElement, useRef } from 'react'; @@ -102,7 +102,7 @@ const CodeBox: FC> = ({
diff --git a/apps/site/components/Common/CrossLink/index.tsx b/apps/site/components/Common/CrossLink/index.tsx
index e96bef0b5a35f..be79a752a5ad1 100644
--- a/apps/site/components/Common/CrossLink/index.tsx
+++ b/apps/site/components/Common/CrossLink/index.tsx
@@ -1,4 +1,4 @@
-import classNames from 'classnames';
+import { clsx } from 'clsx';
 import { useTranslations } from 'next-intl';
 import type { FC } from 'react';
 
@@ -20,7 +20,7 @@ const CrossLink: FC = ({ type, text, link }) => {
   return (
     
       
@@ -29,7 +29,7 @@ const CrossLink: FC = ({ type, text, link }) => {
       
 
       
diff --git a/apps/site/components/Common/LanguageDropDown/index.tsx b/apps/site/components/Common/LanguageDropDown/index.tsx
index 9c71267746807..5d1facb0c2644 100644
--- a/apps/site/components/Common/LanguageDropDown/index.tsx
+++ b/apps/site/components/Common/LanguageDropDown/index.tsx
@@ -1,7 +1,7 @@
 import { LanguageIcon } from '@heroicons/react/24/outline';
 import type { LocaleConfig } from '@node-core/website-i18n/types';
 import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
-import classNames from 'classnames';
+import { clsx } from 'clsx';
 import { useTranslations } from 'next-intl';
 import type { FC } from 'react';
 
@@ -43,7 +43,7 @@ const LanguageDropdown: FC = ({
                onChange({ name, code })}
-                className={classNames(styles.dropDownItem, {
+                className={clsx(styles.dropDownItem, {
                   [styles.currentDropDown]: code === currentLanguage,
                 })}
               >
diff --git a/apps/site/components/Common/Notification/index.tsx b/apps/site/components/Common/Notification/index.tsx
index f84eb00373e0d..a584bfb9cbf0a 100644
--- a/apps/site/components/Common/Notification/index.tsx
+++ b/apps/site/components/Common/Notification/index.tsx
@@ -1,5 +1,5 @@
 import * as ToastPrimitive from '@radix-ui/react-toast';
-import classNames from 'classnames';
+import { clsx } from 'clsx';
 import type { FC } from 'react';
 
 import styles from './index.module.css';
@@ -23,7 +23,7 @@ const Notification: FC = ({
     open={open}
     duration={duration}
     onOpenChange={onChange}
-    className={classNames(styles.root, className)}
+    className={clsx(styles.root, className)}
   >
     
       {children}
diff --git a/apps/site/components/Common/Preview/index.tsx b/apps/site/components/Common/Preview/index.tsx
index 489fdc01b18a4..ef7531e6b4364 100644
--- a/apps/site/components/Common/Preview/index.tsx
+++ b/apps/site/components/Common/Preview/index.tsx
@@ -1,4 +1,4 @@
-import classNames from 'classnames';
+import { clsx } from 'clsx';
 import type { FC } from 'react';
 
 import HexagonGrid from '@/components/Icons/HexagonGrid';
@@ -13,7 +13,7 @@ type PreviewProps = {
 };
 
 const Preview: FC = ({ type = 'announcements', title }) => (
-  
+
diff --git a/apps/site/components/Common/Search/index.tsx b/apps/site/components/Common/Search/index.tsx index 652daa66f1d74..095c771f507c8 100644 --- a/apps/site/components/Common/Search/index.tsx +++ b/apps/site/components/Common/Search/index.tsx @@ -1,7 +1,7 @@ 'use client'; import { MagnifyingGlassIcon } from '@heroicons/react/24/outline'; -import classNames from 'classnames'; +import { clsx } from 'clsx'; import { useTranslations } from 'next-intl'; import { useState, type FC } from 'react'; @@ -47,7 +47,7 @@ export const SearchButton: FC = () => { {t('components.search.searchBox.placeholder')} diff --git a/apps/site/components/Common/Select/index.tsx b/apps/site/components/Common/Select/index.tsx index 3d12632e7ed20..a6a863b78fbeb 100644 --- a/apps/site/components/Common/Select/index.tsx +++ b/apps/site/components/Common/Select/index.tsx @@ -3,7 +3,7 @@ import { ChevronDownIcon } from '@heroicons/react/24/outline'; import * as ScrollPrimitive from '@radix-ui/react-scroll-area'; import * as SelectPrimitive from '@radix-ui/react-select'; -import classNames from 'classnames'; +import { clsx } from 'clsx'; import { useId, useMemo } from 'react'; import type { FC } from 'react'; @@ -68,11 +68,7 @@ const Select: FC = ({ return ( {label && (