File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33Install this component using NPM like so:
44``` bash
5- npm install react-deferred-component --save-dev
5+ npm install react-highlight.js --save
66```
77
88# License
Original file line number Diff line number Diff line change @@ -51,28 +51,34 @@ export default class HighlightDemoDemo extends Component {
5151 To use this component simply < code > npm install react-highlight</ code > and optionally choose a custom stylesheet from
5252 < a href = "https://highlightjs.org/" > highlight.js</ a > .
5353 </ p >
54+ < h2 > Demo</ h2 >
5455 < p >
5556 Try it yourself by specifying a language and content below:
5657 </ p >
57- < p >
58- < label > Language</ label >
59- < input
60- type = 'text'
61- name = 'language'
62- defaultValue = { language }
63- onChange = { event => this . _debouncedSetState ( 'language' , event . target . value ) } />
64- </ p >
65- < p >
66- < label > Content</ label >
67- < textarea
68- type = 'text'
69- name = 'content'
70- defaultValue = { content }
71- onChange = { event => this . _debouncedSetState ( 'content' , event . target . value ) } />
72- </ p >
73- < Highlight language = { language } >
74- { content }
75- </ Highlight >
58+ < form >
59+ < div className = 'form-group' >
60+ < label > Language</ label >
61+ < input
62+ className = 'form-control'
63+ type = 'text'
64+ name = 'language'
65+ defaultValue = { language }
66+ onChange = { event => this . _debouncedSetState ( 'language' , event . target . value ) } />
67+ </ div >
68+ < div className = 'form-group' >
69+ < label > Content</ label >
70+ < textarea
71+ className = 'form-control'
72+ type = 'text'
73+ name = 'content'
74+ defaultValue = { content }
75+ onChange = { event => this . _debouncedSetState ( 'content' , event . target . value ) } />
76+ </ div >
77+ < label > Highlight</ label >
78+ < Highlight language = { language } >
79+ { content }
80+ </ Highlight >
81+ </ form >
7682 </ div >
7783 )
7884 }
Original file line number Diff line number Diff line change 11import 'purecss'
22import 'highlight.js/styles/github.css'
33import './highlight.css'
4- import './main.css'
54
65import React from 'react'
76import ReactDOM from 'react-dom'
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 66 {% if (o.htmlWebpackPlugin.files.favicon ) { %}
77 <link rel= " shortcut icon" href= " {%=o.htmlWebpackPlugin.files.favicon%}" >
88 {% } %}
9+ <link rel= " stylesheet" href= " https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" integrity= " sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin= " anonymous" >
910 {% for (var css in o.htmlWebpackPlugin.files.css ) { %}
1011 <link href= " {%=o.htmlWebpackPlugin.files.css[css] %}" rel= " stylesheet" >
1112 {% } %}
1213 </head>
1314 <body>
14- <div class= " pure-g " >
15- <header class= " pure-u-1 " >
16- <h1>%name %</h1 >
15+ <div class= " container " >
16+ <h1 class= 'page-header'>%name%</h1 >
17+ <p class = " lead " >%description %</p >
1718
18- <div class= " description" >%description%</div>
19- </header>
20-
21- <article class= " pure-u-1" >
22- <section class= " demonstration" >%demo%</section>
23- <section class= " documentation" >%documentation%</section>
24- </article>
19+ <div class= " demonstration" >%demo%</div>
20+ <div class= " documentation" >%documentation%</div>
2521 </div>
2622
2723 {% for (var chunk in o.htmlWebpackPlugin.files.chunks ) { %}
Original file line number Diff line number Diff line change 11{
2- "name" : " react-highlight" ,
2+ "name" : " react-highlight.js " ,
33 "description" : " A lightweight React wrapper around the Highlight.js syntaxt highlighting library" ,
44 "author" : " Brian Vaughn" ,
55 "user" : " bvaughn" ,
106106 },
107107 "repository" : {
108108 "type" : " git" ,
109- "url" : " https://github.com/bvaughn/react-deferred-component .git"
109+ "url" : " https://github.com/bvaughn/react-highlight.js .git"
110110 },
111- "homepage" : " https://github.com/bvaughn/react-deferred-component /" ,
111+ "homepage" : " https://github.com/bvaughn/react-highlight.js /" ,
112112 "bugs" : {
113- "url" : " https://github.com/bvaughn/react-deferred-component /issues"
113+ "url" : " https://github.com/bvaughn/react-highlight.js /issues"
114114 },
115115 "keywords" : [
116116 " react" ,
You can’t perform that action at this time.
0 commit comments