fix(Action-panel): fix theme style issues (#6842)

This commit is contained in:
Zeke Zhang
2025-05-09 15:17:50 +08:00
committed by GitHub
parent 6308884aee
commit 4dc370f0dc
@@ -20,6 +20,7 @@ import {
useDesignable,
useOpenModeContext,
useSchemaInitializerRender,
useToken,
withDynamicSchemaProps,
} from '@nocobase/client';
import { Avatar, Space, theme } from 'antd';
@@ -74,13 +75,24 @@ const ResponsiveSpace = () => {
const InternalIcons = () => {
const fieldSchema = useFieldSchema();
const { layout = WorkbenchLayout.Grid } = fieldSchema.parent['x-component-props'] || {};
const { token } = useToken();
return (
<div className="nb-action-panel-warp">
<DndContext>
{layout === WorkbenchLayout.Grid ? (
<ResponsiveSpace />
) : (
<List>
<List
style={
{
'--adm-color-background': token.colorBgContainer,
'--active-background-color': token.colorBorderSecondary,
'--border-inner': `solid 1px ${token.colorBorderSecondary}`,
'--border-bottom': `none`,
'--border-top': `none`,
} as any
}
>
{fieldSchema.mapProperties((s, key) => {
const icon = s['x-component-props']?.['icon'];
const backgroundColor = s['x-component-props']?.['iconColor'];