mirror of https://github.com/buster-so/buster.git
Update broken imports
This commit is contained in:
parent
0d0ec231c3
commit
d132dca2a5
|
@ -524,14 +524,15 @@ const _THEMES = {
|
|||
} as const;
|
||||
|
||||
Object.entries(_THEMES).forEach(([key, theme]) => {
|
||||
(_THEMES as any)[key] = {
|
||||
// @ts-expect-error - key is a string
|
||||
_THEMES[key] = {
|
||||
...theme,
|
||||
dark: themeColorsToCssVariables(theme.dark),
|
||||
light: themeColorsToCssVariables(theme.light)
|
||||
};
|
||||
});
|
||||
|
||||
export const THEMES: Record<ThemeId, Theme> = _THEMES as any;
|
||||
export const THEMES: Record<ThemeId, Theme> = _THEMES;
|
||||
|
||||
export function themeColorsToCssVariables(colors: Record<string, string>): Record<string, string> {
|
||||
const cssVars = colors
|
||||
|
|
|
@ -64,7 +64,9 @@ export const BlockDraggable: RenderNodeWrapper = (props) => {
|
|||
|
||||
if (!enabled) return;
|
||||
|
||||
return (props) => <Draggable {...props} />;
|
||||
const Component = (props: PlateElementProps) => <Draggable {...props} />;
|
||||
Component.displayName = 'BlockDraggable';
|
||||
return Component;
|
||||
};
|
||||
|
||||
function Draggable(props: PlateElementProps) {
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
Heading1,
|
||||
Heading2,
|
||||
Heading3,
|
||||
Image,
|
||||
Image as ImageIcon,
|
||||
Link2,
|
||||
UnorderedList,
|
||||
OrderedList,
|
||||
|
@ -138,7 +138,7 @@ const groups: Group[] = [
|
|||
group: 'Media',
|
||||
items: [
|
||||
{
|
||||
icon: <Image />,
|
||||
icon: <ImageIcon />,
|
||||
label: 'Image',
|
||||
value: KEYS.img
|
||||
},
|
||||
|
|
|
@ -5,7 +5,7 @@ import * as React from 'react';
|
|||
import type { DropdownMenuProps } from '@radix-ui/react-dropdown-menu';
|
||||
|
||||
import { PlaceholderPlugin } from '@platejs/media/react';
|
||||
import { VolumeUp, FileCloud, Film, Image, Link } from '@/components/ui/icons';
|
||||
import { VolumeUp, FileCloud, Film, Image as ImageIcon, Link } from '@/components/ui/icons';
|
||||
import { isUrl, KEYS } from 'platejs';
|
||||
import { useEditorRef } from 'platejs/react';
|
||||
import { toast } from 'sonner';
|
||||
|
@ -69,7 +69,7 @@ const MEDIA_CONFIG: Record<
|
|||
accept: ['image/*'],
|
||||
icon: (
|
||||
<div className="size-4">
|
||||
<Image />
|
||||
<ImageIcon />
|
||||
</div>
|
||||
),
|
||||
title: 'Insert Image',
|
||||
|
|
Loading…
Reference in New Issue