4.1.9 • Published 3 years ago

@gruzf/styles v4.1.9

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

GRUZF UI Styles

This library is designed to style React components for the Gruzovichkof company.

GRUZF UI Styles is written in typescript and built on the tss-react, Emotion and Material UI libraries

Install

npm install @gruzf/styles

or

yarn add @gruzf/styles

Usage

import makeStyles from "@gruzf/styles";
import CacheProvider from "@gruzf/styles/CacheProvider";
import { ThemeProvider } from "@mui/material/styles";

const PADDING = 12;

const useStyles = makeStyles()((theme, props) => ({
  h1: {
    color: theme.palette.primary.main,
    borderBottom: `2px solid ${theme.palette.secondary.main}`,
    paddingTop: props.paddingTop,
  },
  green: {
    color: "green",
  },
}));

// or import { defaultTheme } from '@gruzf/styles';
const theme = createTheme({
  palette: {
    primary: {
      main: "red",
    },
  },
});

function HelloWorld({ green }) {
  // you can pass anything props to styles
  const { classes, cx } = useStyles({ paddingTop: PADDING });

  return (
    <h1 className={cx(classes.h1, green && classes.green)}>Hello World!</h1>
  );
}

function App() {
  return (
    <CacheProvider>
      <ThemeProvider theme={theme}>
        <HelloWorld green />
      </ThemeProvider>
    </CacheProvider>
  );
}

NextJS implementation

Create _document.js file

import createDocument from "../utils/createDocument";

export default createDocument(options);

Options

Document
  • Type: NextJS Document
  • Default: undefined
4.1.8

3 years ago

4.1.9

3 years ago

4.1.7

3 years ago

4.1.4

3 years ago

4.1.3

3 years ago

4.1.6

3 years ago

4.1.5

3 years ago

4.1.0

4 years ago

4.1.2

3 years ago

4.1.1

4 years ago

4.0.2

4 years ago

4.0.1

4 years ago

4.0.0

4 years ago

3.0.2

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.1.2

4 years ago

2.0.3

4 years ago

2.1.1

4 years ago

2.0.2

4 years ago

2.1.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.6.1

4 years ago

1.6.0

4 years ago

1.5.4

4 years ago

1.5.3

4 years ago

1.5.2

4 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.4

4 years ago

1.4.3

4 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago