refactor: unified cn utils (#29916)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com> Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import Link from 'next/link'
|
||||
import classNames from '@/utils/classnames'
|
||||
import { cn } from '@/utils/classnames'
|
||||
import { Group } from '@/app/components/base/icons/src/vender/other'
|
||||
import { useSelectedLayoutSegment } from 'next/navigation'
|
||||
import DownloadingIcon from './downloading-icon'
|
||||
@@ -26,16 +26,14 @@ const PluginsNav = ({
|
||||
} = usePluginTaskStatus()
|
||||
|
||||
return (
|
||||
<Link href="/plugins" className={classNames(
|
||||
className, 'group', 'plugins-nav-button', // used for use-fold-anim-into.ts
|
||||
<Link href="/plugins" className={cn(className, 'group', 'plugins-nav-button',
|
||||
// used for use-fold-anim-into.ts
|
||||
)}>
|
||||
<div
|
||||
className={classNames(
|
||||
'system-sm-medium relative flex h-8 flex-row items-center justify-center gap-0.5 rounded-xl border border-transparent p-1.5',
|
||||
className={cn('system-sm-medium relative flex h-8 flex-row items-center justify-center gap-0.5 rounded-xl border border-transparent p-1.5',
|
||||
activated && 'border-components-main-nav-nav-button-border bg-components-main-nav-nav-button-bg-active text-components-main-nav-nav-button-text shadow-md',
|
||||
!activated && 'text-text-tertiary hover:bg-state-base-hover hover:text-text-secondary',
|
||||
(isInstallingWithError || isFailed) && !activated && 'border-components-panel-border-subtle',
|
||||
)}
|
||||
(isInstallingWithError || isFailed) && !activated && 'border-components-panel-border-subtle')}
|
||||
>
|
||||
{
|
||||
(isFailed || isInstallingWithError) && !activated && (
|
||||
|
||||
Reference in New Issue
Block a user