diff --git a/packages/mermaid/src/diagrams/class/classDb.ts b/packages/mermaid/src/diagrams/class/classDb.ts index 6d8453dd0..9c8a642c6 100644 --- a/packages/mermaid/src/diagrams/class/classDb.ts +++ b/packages/mermaid/src/diagrams/class/classDb.ts @@ -88,7 +88,7 @@ export const addClass = function (_id: string) { label: name, text: `${name}${type ? `<${type}>` : ''}`, shape: 'classBox', - cssClasses: ['default'], + cssClasses: 'default', methods: [], members: [], annotations: [], @@ -279,7 +279,7 @@ export const setCssClass = function (ids: string, className: string) { } const classNode = classes.get(id); if (classNode) { - classNode.cssClasses.push(className); + classNode.cssClasses += ' ' + className; } }); }; diff --git a/packages/mermaid/src/diagrams/class/classTypes.ts b/packages/mermaid/src/diagrams/class/classTypes.ts index df2c9c0d2..9d0d47569 100644 --- a/packages/mermaid/src/diagrams/class/classTypes.ts +++ b/packages/mermaid/src/diagrams/class/classTypes.ts @@ -7,7 +7,7 @@ export interface ClassNode { label: string; shape: string; text: string; - cssClasses: string[]; + cssClasses: string; methods: ClassMember[]; members: ClassMember[]; annotations: string[];