Skip to content

Commit

Permalink
Change cssClasses to use concatenated string instead of array to pick…
Browse files Browse the repository at this point in the history
… up css styles
  • Loading branch information
yari-dewalt committed Oct 18, 2024
1 parent 10f11e0 commit 0e819ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/mermaid/src/diagrams/class/classDb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [],
Expand Down Expand Up @@ -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;
}
});
};
Expand Down
2 changes: 1 addition & 1 deletion packages/mermaid/src/diagrams/class/classTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface ClassNode {
label: string;
shape: string;
text: string;
cssClasses: string[];
cssClasses: string;
methods: ClassMember[];
members: ClassMember[];
annotations: string[];
Expand Down

0 comments on commit 0e819ae

Please sign in to comment.