mirror of
https://github.com/langgenius/dify.git
synced 2026-02-09 23:20:12 -05:00
chore: remove useless props
This commit is contained in:
@@ -5,10 +5,7 @@ type EditorAreaProps = PropsWithChildren
|
||||
|
||||
const EditorArea: FC<EditorAreaProps> = ({ children }) => {
|
||||
return (
|
||||
<section
|
||||
className="flex flex-1 flex-col rounded-lg"
|
||||
data-component="editor-area"
|
||||
>
|
||||
<section className="flex flex-1 flex-col rounded-lg">
|
||||
{children}
|
||||
</section>
|
||||
)
|
||||
|
||||
@@ -5,10 +5,7 @@ type EditorBodyProps = PropsWithChildren
|
||||
|
||||
const EditorBody: FC<EditorBodyProps> = ({ children }) => {
|
||||
return (
|
||||
<div
|
||||
className="flex flex-1"
|
||||
data-component="editor-body"
|
||||
>
|
||||
<div className="flex flex-1">
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -25,7 +25,6 @@ const EditorTabItem: FC<EditorTabItemProps> = ({ item }) => {
|
||||
'group flex shrink-0 items-center gap-1.5 border-r border-components-panel-border-subtle px-2.5 pb-2 pt-2.5',
|
||||
isActive ? 'bg-components-panel-bg' : 'bg-transparent',
|
||||
)}
|
||||
data-component="editor-tab-item"
|
||||
>
|
||||
<div className="flex items-center gap-1">
|
||||
<div className={cn('flex size-5 items-center justify-center', !isActive && 'opacity-70')}>
|
||||
|
||||
@@ -14,7 +14,6 @@ const EditorTabs: FC<EditorTabsProps> = ({ items }) => {
|
||||
className={cn(
|
||||
'flex items-center overflow-hidden rounded-t-lg border-b border-components-panel-border-subtle bg-components-panel-bg-alt',
|
||||
)}
|
||||
data-component="editor-tabs"
|
||||
>
|
||||
{items.map(item => (
|
||||
<EditorTabItem key={item.id} item={item} />
|
||||
|
||||
@@ -19,7 +19,6 @@ const FileItem: FC<FileItemProps> = ({ name, prefix, active = false }) => {
|
||||
'flex h-6 items-center rounded-md pl-2 pr-1.5 text-text-secondary',
|
||||
active && 'bg-state-base-active text-text-primary',
|
||||
)}
|
||||
data-component="file-item"
|
||||
>
|
||||
{prefix}
|
||||
<div className="flex items-center gap-2 py-0.5">
|
||||
|
||||
@@ -82,7 +82,7 @@ const Files: FC<FilesProps> = ({ items, activeItemId }) => {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex min-h-0 flex-1 flex-col" data-component="files">
|
||||
<div className="flex min-h-0 flex-1 flex-col">
|
||||
<div className="flex min-h-0 flex-1 flex-col gap-px overflow-auto px-1 pb-0 pt-1">
|
||||
{renderNodes(SKILL_ROOT_ID, 0)}
|
||||
</div>
|
||||
|
||||
@@ -19,7 +19,6 @@ const FoldItem: FC<FoldItemProps> = ({ name, prefix, active = false, open = fals
|
||||
'flex h-6 items-center rounded-md pl-2 pr-1.5 text-text-secondary',
|
||||
active && 'bg-state-base-active text-text-primary',
|
||||
)}
|
||||
data-component="fold-item"
|
||||
>
|
||||
{prefix}
|
||||
<div className="flex items-center gap-2 py-0.5">
|
||||
|
||||
@@ -13,10 +13,7 @@ const SidebarSearchAdd: FC = () => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
return (
|
||||
<div
|
||||
className="flex items-center gap-1 bg-components-panel-bg p-2"
|
||||
data-component="sidebar-search-add"
|
||||
>
|
||||
<div className="flex items-center gap-1 bg-components-panel-bg p-2">
|
||||
<SearchInput
|
||||
value={value}
|
||||
onChange={setValue}
|
||||
|
||||
@@ -5,10 +5,7 @@ type SidebarProps = PropsWithChildren
|
||||
|
||||
const Sidebar: FC<SidebarProps> = ({ children }) => {
|
||||
return (
|
||||
<aside
|
||||
className="flex w-[320px] shrink-0 flex-col gap-px overflow-hidden rounded-[10px] border border-components-panel-border-subtle bg-components-panel-bg"
|
||||
data-component="sidebar"
|
||||
>
|
||||
<aside className="flex w-[320px] shrink-0 flex-col gap-px overflow-hidden rounded-[10px] border border-components-panel-border-subtle bg-components-panel-bg">
|
||||
{children}
|
||||
</aside>
|
||||
)
|
||||
|
||||
@@ -3,10 +3,7 @@ import * as React from 'react'
|
||||
|
||||
const SkillDocEditor: FC = () => {
|
||||
return (
|
||||
<div
|
||||
className="h-full w-full overflow-y-auto bg-components-panel-bg"
|
||||
data-component="skill-doc-editor"
|
||||
/>
|
||||
<div className="h-full w-full overflow-y-auto bg-components-panel-bg" />
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -5,10 +5,7 @@ type SkillPageLayoutProps = PropsWithChildren
|
||||
|
||||
const SkillPageLayout: FC<SkillPageLayoutProps> = ({ children }) => {
|
||||
return (
|
||||
<div
|
||||
className="flex h-full gap-3"
|
||||
data-component="skill-page-layout"
|
||||
>
|
||||
<div className="flex h-full gap-3">
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user