File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # react-codepen-embed;
1+ # react-codepen-embed
22React component for embedding pens from [ ` Codepen.io ` ] ( https://codepen.io )
Original file line number Diff line number Diff line change 88 "description" : " React component to embed codepen project" ,
99 "main" : " lib/index.js" ,
1010 "repository" : {
11- "url" : " " ,
11+ "url" : " https://github.com/shettypuneeth/react-codepen-embed " ,
1212 "type" : " git"
1313 },
1414 "author" : " Puneeth Shetty <puneeth102@gmail.com>" ,
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class ReactCodepen extends Component {
3838 }
3939
4040 render ( ) {
41- if ( ! this . state . loaded || this . state . loading ) {
41+ if ( ! this . state . loaded && this . props . loader ) {
4242 return React . createElement ( this . props . loader , {
4343 isLoading : this . state . loading ,
4444 error : this . state . error
@@ -57,7 +57,7 @@ class ReactCodepen extends Component {
5757 data-embed-version = { this . props . version }
5858 data-pen-title = { this . props . title }
5959 data-preview = { this . props . preview }
60- class = "codepen"
60+ className = "codepen"
6161 >
6262 See the Pen < a href = { penLink } > { this . props . title } </ a >
6363 by { this . props . user } (< a href = { userProfileLink } > @{ this . props . user } </ a > )
@@ -72,8 +72,7 @@ class ReactCodepen extends Component {
7272
7373ReactCodepen . defaultProps = {
7474 defaultTab : 'css,result' ,
75- height : 265 ,
76- loader : null ,
75+ height : 300 ,
7776 preview : true ,
7877 themeId : 'dark' ,
7978 version : 2
You can’t perform that action at this time.
0 commit comments