New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

lx-theme

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lx-theme

Theme provider for MUI

latest
npmnpm
Version
0.2.2
Version published
Maintainers
1
Created
Source

lx-theme

Theme provider for MUI. Responds to system light/dark setting.

install

npm i lx-theme

themes

GENERAL CODING KIDS REDBLUE

usage

fixed

import React from "react";
import { Theme, themes } from "lx-theme";
import Stack from "@mui/material/Stack";
import Button from "@mui/material/Button";

const App = () => {
  return (
    <Theme theme={themes["GENERAL"]}>
      <Stack>
        <Button>Button</Button>
      </Stack>
    </Theme>
  );
};

selectable

import React from "react";
import { Theme, Select, themes } from "lx-theme";
import Stack from "@mui/material/Stack";
import Button from "@mui/material/Button";

const App = () => {
  const [theme, setTheme] = useState();

  return (
    <Theme theme={theme}>
      <Stack>
        <Select themes={themes} setTheme={setTheme} />
        <Button>Button</Button>
      </Stack>
    </Theme>
  );
};

custom

import React from "react";
import { Theme } from "lx-theme";

const THEME = {
  light: {
    palette: {
      mode: "light",
      background: {
        default: "#ffff00",
        paper: "white",
      },
    },
  },
  dark: {
    palette: {
      mode: "dark",
      background: {
        default: "black",
        paper: "#ff0000",
      },
    },
  },
};

const App = () => <Theme theme={THEME}>...</Theme>;

Keywords

react

FAQs

Package last updated on 03 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts