mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 18:08:07 +08:00
refactor(skill): replace @remixicon/react imports with CSS icon classes
Migrate all Remixicon component imports in workflow/skill to Tailwind CSS icon utility classes (i-ri-*), reducing JS bundle size. Update MenuItem to accept string icon classes alongside React components. Adjust test selectors that relied on SVG element queries.
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
'use client'
|
||||
|
||||
import { RiZoomInLine, RiZoomOutLine } from '@remixicon/react'
|
||||
import { noop } from 'es-toolkit/function'
|
||||
import * as React from 'react'
|
||||
import { useState } from 'react'
|
||||
@ -36,7 +35,7 @@ const PdfFilePreview = ({ downloadUrl }: PdfFilePreviewProps) => {
|
||||
className="flex size-8 cursor-pointer items-center justify-center rounded-lg bg-components-panel-bg shadow-md hover:bg-state-base-hover"
|
||||
aria-label="Zoom out"
|
||||
>
|
||||
<RiZoomOutLine className="size-4 text-text-tertiary" />
|
||||
<span className="i-ri-zoom-out-line size-4 text-text-tertiary" />
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
@ -44,7 +43,7 @@ const PdfFilePreview = ({ downloadUrl }: PdfFilePreviewProps) => {
|
||||
className="flex size-8 cursor-pointer items-center justify-center rounded-lg bg-components-panel-bg shadow-md hover:bg-state-base-hover"
|
||||
aria-label="Zoom in"
|
||||
>
|
||||
<RiZoomInLine className="size-4 text-text-tertiary" />
|
||||
<span className="i-ri-zoom-in-line size-4 text-text-tertiary" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import { RiArrowDownSLine } from '@remixicon/react'
|
||||
import * as React from 'react'
|
||||
import { useMemo, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
@ -74,7 +73,7 @@ const TableSelector = ({
|
||||
<span className={cn('min-w-0 max-w-[220px] truncate system-sm-medium', isPlaceholder && 'text-text-tertiary')}>
|
||||
{label}
|
||||
</span>
|
||||
<RiArrowDownSLine className="h-3.5 w-3.5 text-text-secondary" aria-hidden="true" />
|
||||
<span className="i-ri-arrow-down-s-line h-3.5 w-3.5 text-text-secondary" aria-hidden="true" />
|
||||
</button>
|
||||
</PortalToFollowElemTrigger>
|
||||
<PortalToFollowElemContent className="z-[1002]">
|
||||
|
||||
Reference in New Issue
Block a user