From 55e37ecd005274048caefdac82fa11b3e46998f8 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 17 May 2019 14:02:29 +0200 Subject: [PATCH] ADD stories for syntaxhighlighter --- .../syntaxhighlighter.stories.tsx | 52 ++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/lib/components/src/syntaxhighlighter/syntaxhighlighter.stories.tsx b/lib/components/src/syntaxhighlighter/syntaxhighlighter.stories.tsx index 7e3e32e4d1c..a3340479966 100644 --- a/lib/components/src/syntaxhighlighter/syntaxhighlighter.stories.tsx +++ b/lib/components/src/syntaxhighlighter/syntaxhighlighter.stories.tsx @@ -1,5 +1,6 @@ -import React from 'react'; +import * as React from 'react'; import { storiesOf } from '@storybook/react'; +import { ThemeProvider, themes, convert, ensure } from '@storybook/theming'; import { SyntaxHighlighter } from './syntaxhighlighter'; storiesOf('Basics|SyntaxHighlighter', module) @@ -18,6 +19,55 @@ storiesOf('Basics|SyntaxHighlighter', module) `} )) + .add('unsupported', () => ( + + {` + // A Hello World! program in C#. + using System; + namespace HelloWorld + { + class Hello + { + static void Main() + { + Console.WriteLine("Hello World!"); + + // Keep the console window open in debug mode. + Console.WriteLine("Press any key to exit."); + Console.ReadKey(); + } + } + } + `} + + )) + .add('themed unsupported', () => { + const theme = ensure(themes.dark); + return ( + + + {` + // A Hello World! program in C#. + using System; + namespace HelloWorld + { + class Hello + { + static void Main() + { + Console.WriteLine("Hello World!"); + + // Keep the console window open in debug mode. + Console.WriteLine("Press any key to exit."); + Console.ReadKey(); + } + } + } + `} + + + ); + }) .add('story', () => ( {`