File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,23 @@ export const Primary: Story = {
2323 ) ,
2424} ;
2525
26+ export const DifferentLanguages : Story = {
27+ render : ( ) => ( < div >
28+ < p > Go</ p >
29+ < GithubPermalink permalink = "https://github.com/dwjohnston/react-github-permalink/blob/5b15aa07e60af4e317086f391b28cadf9aae8e1b/sample_files/sample1.go#L1-L5" />
30+
31+ < p > JavaScript</ p >
32+ < GithubPermalink permalink = "https://github.com/dwjohnston/react-github-permalink/blob/bc75e8fe2d1c0395c9443afe1837f453c05a7698/sample_files/sample1.js#L3-L17" />
33+
34+ < p > SQL</ p >
35+ < GithubPermalink permalink = "https://github.com/dwjohnston/react-github-permalink/blob/bc75e8fe2d1c0395c9443afe1837f453c05a7698/sample_files/sample1.sql#L11-L21" />
36+
37+ < p > TSX</ p >
38+ < GithubPermalink permalink = "https://github.com/dwjohnston/react-github-permalink/blob/242681a9df549adcc9a7fca0d8421d98b7e312c4/sample_files/sample1.tsx#L1-L11" />
39+ </ div >
40+ ) ,
41+ } ;
42+
2643export const WithBackground : Story = {
2744 render : ( ) => (
2845 < div style = { { backgroundColor : "pink" , padding : "1em" } } >
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ const noTheme = {
125125export function SyntaxHighlight ( props : {
126126 text : string ;
127127 startingLineNumber ?: number ;
128- className ?: string ;
128+ className ?: string ;
129129 language ?: string ;
130130} ) {
131131
@@ -142,6 +142,6 @@ export function SyntaxHighlight(props: {
142142 } , [ ] )
143143
144144
145- return < ReactSyntaxHighlighter className = { className } style = { ready ? isDarkMode ? tomorrowNight : github : noTheme } language = { language } showLineNumbers = { startingLineNumber !== undefined } startingLineNumber = { startingLineNumber } > { text } </ ReactSyntaxHighlighter >
145+ return < ReactSyntaxHighlighter className = { className } style = { ready ? isDarkMode ? tomorrowNight : github : noTheme } showLineNumbers = { startingLineNumber !== undefined } startingLineNumber = { startingLineNumber } > { text } </ ReactSyntaxHighlighter >
146146
147147}
You can’t perform that action at this time.
0 commit comments