@material-ui/styles#withStyles JavaScript Examples

The following examples show how to use @material-ui/styles#withStyles. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: progressBar.js    From Queen with MIT License 6 votes vote down vote up
CustomProgressBar = withStyles(theme => ({
  root: {
    height: 10,
    borderRadius: 5,
  },
  colorPrimary: {
    backgroundColor: theme.palette.grey[theme.palette.type === 'light' ? 200 : 700],
  },
  bar: {
    borderRadius: 5,
    backgroundColor: '#47b52c',
  },
}))(LinearProgress)
Example #2
Source File: ODCheckbox.js    From course-manager with MIT License 6 votes vote down vote up
ODCheckbox = withStyles({
  root: {
    color: '#ffb347',
    '&$checked': {
      color: '#ffb347'
    }
  },
  checked: {}
})((props) => <Checkbox color="default" {...props} />)
Example #3
Source File: globalStyles.js    From course-manager with MIT License 6 votes vote down vote up
GlobalStyles = withStyles((theme) => ({
  '@global': {
    '*': {
      margin: 0,
      padding: 0,
      boxSizing: 'border-box'
    },
    html: {
      width: '100%',
      height: '100%',
      '-ms-text-size-adjust': '100%',
      '-webkit-overflow-scrolling': 'touch'
    },
    body: {
      width: '100%',
      height: '100%'
    },
    '#root': {
      width: '100%',
      height: '100%'
    },
    input: {
      '&[type=number]': {
        MozAppearance: 'textfield',
        '&::-webkit-outer-spin-button': { margin: 0, WebkitAppearance: 'none' },
        '&::-webkit-inner-spin-button': { margin: 0, WebkitAppearance: 'none' }
      }
    },
    textarea: {
      '&::-webkit-input-placeholder': { color: theme.palette.text.disabled },
      '&::-moz-placeholder': { opacity: 1, color: theme.palette.text.disabled },
      '&:-ms-input-placeholder': { color: theme.palette.text.disabled },
      '&::placeholder': { color: theme.palette.text.disabled }
    },
    a: { color: theme.palette.primary.main },
    img: { display: 'block', maxWidth: '100%' }
  }
}))(() => null)
Example #4
Source File: contactus.js    From upvision.github.io with MIT License 6 votes vote down vote up
SubmitButton = withStyles({
    root: {
        background: 'transparent',
        border: '1px solid #13e8b5',
        borderRadius: 5,
        color: 'white',
        height: 45,
        padding: '0 20px',
        marginTop: '20px',
        fontSize: '1.3rem',
        letterSpacing: '1px',
        textTransform: 'capitalize',
        "&:hover": {
            background: '#13a884',
        },
    },
    
})(Button)
Example #5
Source File: contactus.js    From upvision.github.io with MIT License 6 votes vote down vote up
FormField = withStyles({
    root: {
        width: '100%', 
        backgroundColor: 'transparent',
        color: 'white',
        marginTop: '20px', 
        paddingTop: '0px',
        borderRadius: '5px',
        marginBottom: '20px',
        '& label': {
            color: '#13e8b5'
        },
        '& .Mui-focused': {
            color: 'white'
        },
        '& .MuiOutlinedInput-root': {
            '& fieldset': {
              borderColor: 'white',
            },
            '&:hover fieldset': {
              borderColor: 'white',
            },
            '&.Mui-focused fieldset': {
              borderColor: '#13e8b5',
            },
            '&.Mui-focused.Mui-error fieldset': {
                borderColor: '#f44336',
            },
        },
        '& .MuiFormHelperText-root': {
            textAlign: 'right',
            color: 'white',
        }
    },
})(TextField)
Example #6
Source File: index.jsx    From redive_linebot with MIT License 6 votes vote down vote up
Fab = withStyles({
  root: {
    backgroundColor: "#ff6d00",
    color: "#fff",
    "&:hover": {
      backgroundColor: "#ff6d00",
      color: "#fff",
    },
    position: "fixed",
    bottom: "10px",
    right: "10px",
  },
})(MuiFab)
Example #7
Source File: component.jsx    From wiki with GNU General Public License v3.0 6 votes vote down vote up
StyledMenu = withStyles({
  paper: {
    border: '1px solid #d3d4d5',
  },
})((props) => (
  <Menu
    elevation={0}
    getContentAnchorEl={null}
    anchorOrigin={{
      vertical: 'bottom',
      horizontal: 'center',
    }}
    transformOrigin={{
      vertical: 'top',
      horizontal: 'center',
    }}
    {...props}
  />
))
Example #8
Source File: component.jsx    From wiki with GNU General Public License v3.0 6 votes vote down vote up
StyledMenuItem = withStyles((theme) => ({
  root: {
    '&:focus': {
      backgroundColor: theme.palette.primary.main,
      '& .MuiListItemIcon-root, & .MuiListItemText-primary': {
        color: theme.palette.common.white,
      },
    },
  },
}))(MenuItem)