Skip to content

Commit

Permalink
register custom syntax in a story loader
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbes7878 committed Jul 5, 2023
1 parent a599ade commit a9d0d22
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ import React from 'react';
import scss from 'react-syntax-highlighter/dist/esm/languages/prism/scss';
import { SyntaxHighlighter } from './lazy-syntaxhighlighter';

// Register custom language
SyntaxHighlighter.registerLanguage('scss', scss);

export default {
component: SyntaxHighlighter,
};
Expand Down Expand Up @@ -123,6 +120,7 @@ div.parent {
}
}`,
},
loaders: [() => SyntaxHighlighter.registerLanguage('scss', scss)],
};

export const Unsupported = {
Expand Down

0 comments on commit a9d0d22

Please sign in to comment.