react-shadow
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -80,2 +80,3 @@ import React, { Component, PropTypes } from 'react'; | ||
const label = weather ? `${weather.main.temp}${String.fromCharCode(8451)}` : String.fromCharCode(8212); | ||
const fheit = weather ? `${weather.main.temp * 9 / 5 + 32}${String.fromCharCode(8457)}` : ''; | ||
@@ -85,3 +86,3 @@ return ( | ||
<div className="my-weather"> | ||
<div className="weather"> | ||
@@ -91,3 +92,3 @@ <img src={filenameFor(country)} alt={country} /> | ||
<h1>{title}</h1> | ||
<h2>{label}</h2> | ||
<h2 title={fheit}>{label}</h2> | ||
@@ -94,0 +95,0 @@ <ul> |
@@ -1,12 +0,8 @@ | ||
(function($process) { | ||
import http from 'http'; | ||
import express from 'express'; | ||
"use strict"; | ||
const app = express(); | ||
const server = http.createServer(app); | ||
var express = require('express'), | ||
app = express(), | ||
server = require('http').createServer(app); | ||
app.use(express.static(__dirname + '/..')); | ||
server.listen($process.env.PORT || 5000); | ||
})(process); | ||
app.use(express.static(__dirname + '/example')); | ||
server.listen(process.env.PORT || 5000); |
{ | ||
"name": "react-shadow", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Utilise Shadow DOM in React with all the benefits of style encapsulation.", | ||
"main": "dist/react-shadow.js", | ||
"scripts": { | ||
"start": "node example/server/default.js", | ||
"start": "babel example/server/default.js | node", | ||
"build": "webpack && npm run example", | ||
@@ -36,2 +36,3 @@ "example": "webpack --config webpack.dev-config.js", | ||
"axios-mock-adapter": "^1.6.1", | ||
"babel-cli": "^6.14.0", | ||
"babel-core": "^6.14.0", | ||
@@ -38,0 +39,0 @@ "babel-loader": "^6.2.5", |
@@ -23,3 +23,3 @@ ![Screenshot](media/screenshot.png) | ||
<ShadowDOM cssDocuments={['css/core/calendar.css', props.theme]}> | ||
<h1>Calendar</h1> | ||
<h1>Calendar for {props.date}</h1> | ||
</ShadowDOM> | ||
@@ -26,0 +26,0 @@ ); |
@@ -22,4 +22,10 @@ import { get as fetch } from 'axios'; | ||
*/ | ||
const fetchStylesheet = memoize(document => fetch(document).then(response => response.data)); | ||
const fetchStylesheet = memoize(document => { | ||
return new Promise(resolve => { | ||
fetch(document).then(response => response.data).then(response => resolve(response)).catch(() => resolve('')); | ||
}); | ||
}); | ||
/** | ||
@@ -26,0 +32,0 @@ * @class ShadowDOM |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
605842
3171
25
3