Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stylized-component

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylized-component - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

dist/components/Button.d.ts

6

dist/index.d.ts

@@ -1,3 +0,3 @@

export { Theme } from './Theme';
export { StyledComponent, styleId } from './StyledComponent';
export { ThemeProvider, ThemeProps } from './ThemeProvider';
export { StylizedComponent } from './components/StylizedComponent';
export { ThemeProvider } from './components/ThemeProvider';
export { Button } from './components/Button';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var StyledComponent_1 = require("./StyledComponent");
exports.StyledComponent = StyledComponent_1.StyledComponent;
exports.styleId = StyledComponent_1.styleId;
var ThemeProvider_1 = require("./ThemeProvider");
var StylizedComponent_1 = require("./components/StylizedComponent");
exports.StylizedComponent = StylizedComponent_1.StylizedComponent;
var ThemeProvider_1 = require("./components/ThemeProvider");
exports.ThemeProvider = ThemeProvider_1.ThemeProvider;
var Button_1 = require("./components/Button");
exports.Button = Button_1.Button;
//# sourceMappingURL=index.js.map

@@ -5,3 +5,3 @@ /// <reference types="react" />

import { ThemeContext } from './ThemeProvider';
export declare abstract class StyledComponent<Style, Props extends Style, State> extends Component<Props, State> {
export declare class StyledComponent<Style, Props extends Style, State> extends Component<Props, State> {
static contextTypes: {

@@ -14,3 +14,4 @@ theme: PropTypes.Requireable<any>;

constructor(props: Props, context: ThemeContext);
componentWillReceiveProps(nextProps: Props): void;
}
export declare const styleId: (key: string) => (target: Function) => void;

@@ -27,2 +27,6 @@ "use strict";

}
StyledComponent.prototype.componentWillReceiveProps = function (nextProps) {
var contextStyle = _.get(this.context, ['theme', this.styleId]);
this.style = _.extend(contextStyle, nextProps);
};
StyledComponent.contextTypes = {

@@ -29,0 +33,0 @@ theme: PropTypes.object,

@@ -0,1 +1,4 @@

export interface Themes {
[key: string]: Theme;
}
export interface Theme {

@@ -2,0 +5,0 @@ [key: string]: ThemeStyle;

@@ -21,3 +21,4 @@ /// <reference types="react" />

getChildContext(): ThemeContext;
componentWillReceiveProps(nextProps: Props): void;
render(): JSX.Element;
}

@@ -27,2 +27,5 @@ "use strict";

};
ThemeProvider.prototype.componentWillReceiveProps = function (nextProps) {
this.theme = nextProps.theme;
};
ThemeProvider.prototype.render = function () {

@@ -29,0 +32,0 @@ return React.createElement("div", null, this.props.children);

{
"name": "stylized-component",
"version": "0.0.11",
"version": "0.0.12",
"description": "A design prototype",

@@ -17,5 +17,7 @@ "main": "dist/index.js",

"dependencies": {
"@types/color": "^2.0.0",
"@types/lodash": "^4.14.85",
"@types/prop-types": "^15.5.2",
"@types/react": "^16.0.7",
"color": "^2.0.1",
"lodash": "^4.17.4",

@@ -22,0 +24,0 @@ "prop-types": "^15.5.2",

@@ -1,3 +0,3 @@

export { Theme } from './Theme';
export { StyledComponent, styleId } from './StyledComponent';
export { ThemeProvider, ThemeProps } from './ThemeProvider';
export { StylizedComponent } from './components/StylizedComponent';
export { ThemeProvider } from './components/ThemeProvider';
export { Button } from './components/Button';

@@ -0,1 +1,5 @@

export interface Themes {
[key: string]: Theme;
}
export interface Theme {

@@ -2,0 +6,0 @@ [key: string]: ThemeStyle;

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc