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

mui-app-theme

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mui-app-theme - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

dist/DefaultCreateAppThemeOptions.d.ts

3

dist/AppTheme.d.ts

@@ -15,2 +15,3 @@ import { Direction, Theme, Transitions } from "@material-ui/core";

import { IAppThemeTypography } from "./IAppThemeTypography";
import { ICreateAppThemeOptions } from "./ICreateAppThemeOptions";
export declare class AppTheme implements Theme, IAppTheme {

@@ -30,3 +31,3 @@ breakpoints: Breakpoints;

zIndex: ZIndex;
constructor(theme: Theme, colors: IAppThemeColors, typography: IAppThemeTypography);
constructor(theme: Theme, options: ICreateAppThemeOptions);
}
export class AppTheme {
constructor(theme, colors, typography) {
constructor(theme, options) {
this.breakpoints = theme.breakpoints;

@@ -13,7 +13,7 @@ this.direction = theme.direction;

this.transitions = theme.transitions;
this.typography = Object.assign(Object.assign({}, theme.typography), typography);
this.typography = Object.assign(Object.assign({}, theme.typography), options.themeTypography);
this.zIndex = theme.zIndex;
this.colors = colors;
this.colors = options.themeColors;
}
}
//# sourceMappingURL=AppTheme.js.map
import { IAppTheme } from "./IAppTheme";
import { IAppThemeColors } from "./IAppThemeColors";
import { IAppThemeTypography } from "./IAppThemeTypography";
export declare function createAppTheme(themeColors?: IAppThemeColors, themeTypography?: IAppThemeTypography): IAppTheme;
import { ICreateAppThemeOptions } from "./ICreateAppThemeOptions";
export declare function createAppTheme(options?: ICreateAppThemeOptions): IAppTheme;
import createMuiTheme from "@material-ui/core/styles/createMuiTheme";
import { AppTheme } from "./AppTheme";
import { AppThemeColors } from "./AppThemeColors";
import { AppThemeTypography } from "./AppThemeTypography";
import { DefaultCreateAppThemeOptions } from "./DefaultCreateAppThemeOptions";
import { overrideMaterialUIPalette, overrideMaterialUIStyles } from "./overrides";
export function createAppTheme(themeColors = new AppThemeColors(), themeTypography = new AppThemeTypography()) {
const overriddenPalette = overrideMaterialUIPalette(themeColors);
const overriddenStyles = overrideMaterialUIStyles(themeColors);
export function createAppTheme(options = new DefaultCreateAppThemeOptions()) {
if (!options.themeColors) {
options.themeColors = DefaultCreateAppThemeOptions.DefaultAppThemeColors();
}
if (!options.themeTypography) {
options.themeTypography = DefaultCreateAppThemeOptions.DefaultAppThemeTypography();
}
const overriddenPalette = overrideMaterialUIPalette(options.themeColors);
const overriddenStyles = overrideMaterialUIStyles(options.themeColors);
const muiTheme = createMuiTheme({

@@ -13,5 +18,5 @@ palette: overriddenPalette,

});
const appTheme = new AppTheme(muiTheme, themeColors, themeTypography);
const appTheme = new AppTheme(muiTheme, options);
return appTheme;
}
//# sourceMappingURL=createAppTheme.js.map
{
"name": "mui-app-theme",
"version": "1.2.3",
"version": "1.2.4",
"description": "Allow to override material ui theme colors",

@@ -5,0 +5,0 @@ "contributors": [

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