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.8 to 0.0.9

6

dist/StyledComponent.d.ts
/// <reference types="react" />
import * as React from 'react';
import * as PropTypes from 'prop-types';
import { Component } from 'react';
import { ThemeProviderContext } from './ThemeProvider';
export declare class StyledComponent<ComponentTheme, Props, State> extends React.Component<Props, State> {
export declare class StyledComponent<Styles, Props extends Styles, State> extends Component<Props, State> {
static contextTypes: {

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

context: ThemeProviderContext;
style: Partial<ComponentTheme>;
style: Partial<Styles>;
themeKey: string;

@@ -13,0 +13,0 @@ constructor(props: Props, context: ThemeProviderContext);

@@ -14,4 +14,4 @@ "use strict";

var _ = require("lodash");
var React = require("react");
var PropTypes = require("prop-types");
var react_1 = require("react");
var StyledComponent = /** @class */ (function (_super) {

@@ -33,3 +33,3 @@ __extends(StyledComponent, _super);

return StyledComponent;
}(React.Component));
}(react_1.Component));
exports.StyledComponent = StyledComponent;

@@ -36,0 +36,0 @@ exports.themeKey = function (key) {

{
"name": "stylized-component",
"version": "0.0.8",
"version": "0.0.9",
"description": "A design prototype",

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

import * as _ from 'lodash';
import * as React from 'react';
import * as PropTypes from 'prop-types';
import { Component } from 'react';

@@ -8,3 +8,3 @@ import { ThemeProviderContext } from './ThemeProvider';

export class StyledComponent<ComponentTheme, Props, State> extends React.Component<Props, State> {
export class StyledComponent<Styles, Props extends Styles, State> extends Component<Props, State> {
static contextTypes = {

@@ -15,3 +15,3 @@ theme: PropTypes.object,

context: ThemeProviderContext;
style: Partial<ComponentTheme>;
style: Partial<Styles>;
themeKey: string;

@@ -25,3 +25,3 @@

// 2. Overrides defined in context.theme
const propStyle: Partial<ComponentTheme> = _.extend({}, props);
const propStyle: Partial<Styles> = _.extend({}, props);
const contextStyle = _.get(context, `theme.overrides['${this.themeKey}']`);

@@ -28,0 +28,0 @@ this.style = _.extend(contextStyle, propStyle);

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