03a4410272
主要工作是共享同一套“画布内核与通用 UI 源码”,网站和 Tauri 只分别实现宿主适配层。 --------- Co-authored-by: 段舒康 <kdletters@qq.com> Co-authored-by: kdletters <kdletters@qq.com> Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/136 Co-authored-by: menghao <mh18530625731@163.com> Co-committed-by: menghao <mh18530625731@163.com>
17 lines
483 B
TypeScript
17 lines
483 B
TypeScript
import { CanvasPortal } from '@genarrative/image-canvas-react';
|
|
import type { ReactNode } from 'react';
|
|
|
|
import { useAuthUi } from '../auth/AuthUiContext';
|
|
|
|
export function ImageCanvasEditorPortal({ children }: { children: ReactNode }) {
|
|
const platformTheme = useAuthUi()?.platformTheme ?? 'light';
|
|
|
|
return (
|
|
<CanvasPortal
|
|
className={`platform-theme platform-theme--${platformTheme} image-canvas-editor__portal-theme`}
|
|
>
|
|
{children}
|
|
</CanvasPortal>
|
|
);
|
|
}
|