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.9 to 0.0.10

2

dist/index.d.ts
export { Theme } from './Theme';
export { StyledComponent, themeKey } from './StyledComponent';
export { StyledComponent, styleId } from './StyledComponent';
export { ThemeProvider, ThemeProps } from './ThemeProvider';

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

exports.StyledComponent = StyledComponent_1.StyledComponent;
exports.themeKey = StyledComponent_1.themeKey;
exports.styleId = StyledComponent_1.styleId;
var ThemeProvider_1 = require("./ThemeProvider");
exports.ThemeProvider = ThemeProvider_1.ThemeProvider;
//# sourceMappingURL=index.js.map

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

style: Partial<Styles>;
themeKey: string;
styleId: string;
constructor(props: Props, context: ThemeProviderContext);
}
export declare const themeKey: (key: string) => (target: Function) => void;
export declare const styleId: (key: string) => (target: Function) => void;

@@ -24,3 +24,3 @@ "use strict";

var propStyle = _.extend({}, props);
var contextStyle = _.get(context, "theme.overrides['" + _this.themeKey + "']");
var contextStyle = _.get(context, "theme['" + _this.styleId + "']");
_this.style = _.extend(contextStyle, propStyle);

@@ -35,7 +35,7 @@ return _this;

exports.StyledComponent = StyledComponent;
exports.themeKey = function (key) {
exports.styleId = function (key) {
return function (target) {
target.prototype.themeKey = key;
target.prototype.styleId = key;
};
};
//# sourceMappingURL=StyledComponent.js.map
export interface Theme {
overrides?: ComponentThemes;
[key: string]: Style;
}
export interface ComponentTheme {
export interface Style {
dangerouslyOverrideCss?: CSSStyleDeclaration;
[prop: string]: any;
}
export interface ComponentThemes {
[key: string]: ComponentTheme;
}
{
"name": "stylized-component",
"version": "0.0.9",
"version": "0.0.10",
"description": "A design prototype",

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

export { Theme } from './Theme';
export { StyledComponent, themeKey } from './StyledComponent';
export { StyledComponent, styleId } from './StyledComponent';
export { ThemeProvider, ThemeProps } from './ThemeProvider';

@@ -15,3 +15,3 @@ import * as _ from 'lodash';

style: Partial<Styles>;
themeKey: string;
styleId: string;

@@ -25,3 +25,3 @@ constructor(props: Props, context: ThemeProviderContext) {

const propStyle: Partial<Styles> = _.extend({}, props);
const contextStyle = _.get(context, `theme.overrides['${this.themeKey}']`);
const contextStyle = _.get(context, `theme['${this.styleId}']`);
this.style = _.extend(contextStyle, propStyle);

@@ -31,6 +31,6 @@ }

export const themeKey = (key: string) => {
export const styleId = (key: string) => {
return function (target: Function) {
target.prototype.themeKey = key;
target.prototype.styleId = key;
};
};
export interface Theme {
overrides?: ComponentThemes;
[key: string]: Style;
}
export interface ComponentTheme {
export interface Style {
dangerouslyOverrideCss?: CSSStyleDeclaration;
[prop: string]: any;
}
export interface ComponentThemes {
[key: string]: ComponentTheme;
}

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