-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from eqxmedianl/dev
Dev
- Loading branch information
Showing
5 changed files
with
72 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.readme-md h1 { | ||
margin-bottom: 1.5rem; | ||
} | ||
|
||
.readme-md h2 { | ||
margin: 1.25rem 0; | ||
} | ||
|
||
.readme-md h3 { | ||
margin-bottom: 1rem; | ||
} | ||
|
||
.readme-md h4 { | ||
margin: 1.5rem 0 0.75rem 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/** | ||
* | ||
* The code is this file is subject to EQX Proprietary License. Therefor it is copyrighted and restricted | ||
* from being copied, reproduced or redistributed by any party or indiviual other than the original | ||
* copyright holder mentioned below. | ||
* | ||
* It's also not allowed to copy or redistribute the compiled binaries without explicit consent. | ||
* | ||
* (c) 2021 EQX Media B.V. - All rights are stricly reserved. | ||
* | ||
*/ | ||
import React, { Component } from 'react'; | ||
import ReactMarkdown from 'react-markdown' | ||
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter' | ||
import { vs } from 'react-syntax-highlighter/dist/esm/styles/prism' | ||
|
||
import './Readme.css'; | ||
|
||
const renderers = { | ||
code: ({ language, value }) => { | ||
return <SyntaxHighlighter style={vs} language={language} children={value} /> | ||
} | ||
} | ||
|
||
export class Readme extends Component { | ||
constructor(props) { | ||
super(props); | ||
|
||
this.state = { contents: null } | ||
} | ||
|
||
componentWillMount() { | ||
fetch(this.props.markDownUrl) | ||
.then((response) => response.text()).then((text) => { | ||
this.setState({ contents: text }) | ||
}) | ||
} | ||
|
||
render() { | ||
return ( | ||
<section class="readme-md"> | ||
<ReactMarkdown renderers={renderers} source={this.state.contents} /> | ||
</section> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters