Socket
Socket
Sign inDemoInstall

@thepeaklab/styled-material-ui

Package Overview
Dependencies
136
Maintainers
2
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @thepeaklab/styled-material-ui

Styled material ui components


Version published
Maintainers
2
Install size
23.6 MB
Created

Readme

Source

Description

Style material ui components with the awesome styled-components library.

How to install

npm install @thepeaklab/styled-material-ui --save

How does it work

Material UI has its own documentation for the integration of the styled-components library. However, one quickly notices that subordinate components cannot be addressed directly. This is possible with this library.

We write all component keys from the Material UI documentation as CSS classes to the respective components and their child components. Thus it is possible to style the components via CSS classes.

TextField Example

import React from "react";
import styled from "styled-components";
import { TextField } from "@thepeaklab/styled-material-ui";
import Selectors from "@thepeaklab/styled-material-ui/Selectors";

const StyledTextField = styled(TextField)`
  ${Selectors.TextField.Input} {
    background-color: #eeeeee;
  }
`;

export default () => <StyledTextField name="my-textfield" />;

Button Example

import React from "react";
import styled from "styled-components";
import { Button } from "@thepeaklab/styled-material-ui";
import Selectors from "@thepeaklab/styled-material-ui/Selectors";

const StyledButton = styled(Button)`
  ${Selectors.Button.Root} {
    border-radius: 10px;
  }

  ${Selectors.Button.ContainedPrimary} {
    background-color: #eeeeee;

    &:hover {
      background-color: #cccccc;
    }
  }
`;

export default () => <StyledButton color="primary" variant="contained" />;

Available Material-UI Components

  • AppBar
  • Avatar
  • Backdrop
  • Badge
  • BottomNavigation
  • BottomNavigationAction
  • Button
  • ButtonBase
  • Card
  • CardActionArea
  • CardActions
  • CardContent
  • CardHeader
  • CardMedia
  • Checkbox
  • Chip
  • CircularProgress
  • ClickAwayListener
  • Collapse
  • CssBaseline
  • Dialog
  • DialogActions
  • DialogContent
  • DialogContentText
  • DialogTitle
  • Divider
  • Drawer
  • ExpansionPanel
  • ExpansionPanelActions
  • ExpansionPanelDetails
  • ExpansionPanelSummary
  • Fab
  • Fade
  • FormControl
  • FormControlLabel
  • FormGroup
  • FormHelperText
  • FormLabel
  • Grid
  • GridList
  • GridListTile
  • GridListTileBar
  • Grow
  • Hidden
  • Icon
  • IconButton
  • Input
  • InputAdornment
  • InputLabel
  • LinearProgress
  • List
  • ListItem
  • ListItemAvatar
  • ListItemIcon
  • ListItemSecondaryAction
  • ListItemText
  • ListSubheader
  • Menu
  • MenuItem
  • MenuList
  • MobileStepper
  • Modal
  • MuiThemeProvider
  • NativeSelect
  • NoSsr
  • OutlinedInput
  • Paper
  • Popover
  • Popper
  • Portal
  • Radio
  • RadioGroup
  • RootRef
  • Select
  • Slide
  • Snackbar
  • SnackbarContent
  • Step
  • StepButton
  • StepConnector
  • StepContent
  • StepIcon
  • StepLabel
  • Stepper
  • SvgIcon
  • SwipeableDrawer
  • Switch
  • Tab
  • Table
  • TableBody
  • TableCell
  • TableFooter
  • TableHead
  • TablePagination
  • TableRow
  • TableSortLabel
  • Tabs
  • TextField
  • Toolbar
  • Tooltip
  • TouchRipple
  • Typography
  • Zoom

Keywords

FAQs

Last updated on 26 Feb 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc