feat(react): add warning when styles not loaded #4047

This commit is contained in:
moklick
2024-05-07 18:25:04 +02:00
parent 32bac3e133
commit a364a93082
3 changed files with 27 additions and 1 deletions
+2 -1
View File
@@ -1,6 +1,5 @@
import { CoordinateExtent, HandleType } from './types';
// @todo: update URLs to xyflow
export const errorMessages = {
error001: () =>
'[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001',
@@ -23,6 +22,8 @@ export const errorMessages = {
error011: (edgeType: string) => `Edge type "${edgeType}" not found. Using fallback type "default".`,
error012: (id: string) =>
`Node with id "${id}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,
error013: (lib: string = 'react') =>
`It seems that you haven't loaded the styles. Please import '@xyflow/${lib}/dist/style.css' or base.css to make sure everything is working properly.`,
};
export const infiniteExtent: CoordinateExtent = [