@20i/react-css-classes
TypeScript icon, indicating that this package has built-in type declarations

1.2.4 • Public • Published

@20i/react-css-classes

Using a MUI theme, provides a lot of CSS classes to make writing React components quicker!

Peer Deps

"@material-ui/core": "^4.9.0"
"@material-ui/styles": "^4.9.0"

Init

// filename: style.ts

import { createMuiTheme } from "@material-ui/core/styles"
import { useClasses } from "@20i/react-css-classes"

export const theme = createMuiTheme({
    // typography,
    // palette,
    // breakpoints,
    // spacing,
    // overrides,
    // props
})

// export the hook!
export const useReactCSSClasses = useClasses(theme)

Usage in a react component

import { useReactCSSClasses } from "style"
import React from "react"

const MyReactComponent = () => {
    const rc = useReactCSSClasses()

    // use whatever classes you want. There's a ton!!
    const className = rc.bgPrimaryDark

    return (
        <div className={className}>
            This is my component
        </div>
    )
}

CSS Classes

There's a lot of helper CSS classes. You can view them by category.

Animation Border Color Flex Handy MarginPadding Opacity Positional Shadow TextAlignment Transform

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.2.41latest

Version History

VersionDownloads (Last 7 Days)Published
1.2.41
1.2.31
1.1.101
1.1.91
1.0.471
1.0.461
1.0.411
1.0.401
1.0.361
1.0.331
1.0.321
1.0.311

Package Sidebar

Install

npm i @20i/react-css-classes

Weekly Downloads

12

Version

1.2.4

License

ISC

Unpacked Size

118 kB

Total Files

53

Last publish

Collaborators

  • wilblack
  • trevordilley
  • wasredacted
  • james-20i
  • 20i-npm-service
  • valery20i
  • hiddn
  • keeto-20i
  • gelfer
  • tony20i
  • mearl20i
  • mook-20i
  • orianna-20i