npm.io
1.2.8 • Published 6 years ago

mui-app-theme

Licence
MIT
Version
1.2.8
Deps
3
Size
45 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

Installation

npm install mui-app-theme

How to use

// MyColors.ts
import { AppThemeColors } from "mui-app-theme";

export class MyColors extends AppThemeColors {
    constructor() {
        super();
        this.primary = {
            main: "rgba(33, 33, 33)",
            hover: "rgba(66, 66, 66)",
            text: "rgba(189, 189, 189, 0.87)",
        
            outline: {
                main: "rgba(255, 255, 255)",
                hover: "rgba(0, 0, 0, 0.08)",
            },
            disabled: {
                main: "rgba(238, 238, 238)",
                text: "rgba(189, 189, 189, 0.87)",
            },
        };
    }
}
// App.tsx
import { createAppTheme } from "mui-app-theme";
import React, { FunctionComponent } from "react";
import { ThemeProvider } from "@material-ui/styles";

import { MyColors } from "./MyColors";

const App: FunctionComponent = () => {
    const appTheme = createAppTheme(new MyColors());

    return (
        <ThemeProvider theme={appTheme}>
            {
            // children
            }
        </ThemeProvider>
    );
};