@material-ui/core#Theme TypeScript Examples

The following examples show how to use @material-ui/core#Theme. 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: ExperimentStatus.tsx    From abacus with GNU General Public License v2.0 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) =>
  createStyles({
    root: {
      fontFamily: theme.custom.fonts.monospace,
    },
    completed: {
      backgroundColor: '#4CAF50',
    },
    running: {
      backgroundColor: '#FF9800',
    },
    staging: {
      backgroundColor: '#1E77A5',
    },
    disabled: {
      backgroundColor: '#828282',
    },
    statusDot: {
      display: 'inline-block',
      borderRadius: 100,
      height: '.8em',
      width: '.8em',
      verticalAlign: 'middle',
    },
  }),
)
Example #2
Source File: AccountPage.tsx    From clarity with Apache License 2.0 6 votes vote down vote up
styles = (theme: Theme) =>
  createStyles({
    root: {
      '& .MuiTextField-root': {
        marginTop: theme.spacing(2)
      }
    },
    importButton: {
      marginTop: theme.spacing(8)
    }
  })
Example #3
Source File: styles.tsx    From DamnVulnerableCryptoApp with MIT License 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) =>
  createStyles({
    menuButton: {
      marginRight: theme.spacing(2),
    },
    title: {
      flexGrow: 1,
    },
    toolbar: {
      display: 'flex',
      'justify-content': "space-between",
    },
    appbar: {
      'margin-bottom': '40px'
    },

    menuLeft: {
      display: 'flex',
      flexFlow: "flex-direction",
    },
    menuLogo: {
      height: '30px',
      marginTop: '9px',
      cursor: 'pointer'
    },
    docsLink: {
      color: '#FFF',
      textDecoration: 'none',
      fontSize: '1rem',
      fontFamily: '"Roboto", "Helvetica", "Arial", sans-serif',
      fontWeight: 400,
      lineHeight: '43px',
      letterSpacing: '0.00938em',
      paddingRight: '20px'
    }

  }),
)
Example #4
Source File: index.tsx    From Nishan with MIT License 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) =>
  createStyles({
    formControl: {
      margin: theme.spacing(1),
    },
    selectEmpty: {
      marginTop: theme.spacing(2),
    },
  }),
)
Example #5
Source File: ValidatorReport.tsx    From community-repo with GNU General Public License v3.0 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) =>
    createStyles({
        root: {
            flexGrow: 1,
        },
        backdrop: {
            zIndex: theme.zIndex.drawer + 1,
            color: '#fff',
            position: 'absolute',
            width: '100%'
        },
    }),
)
Example #6
Source File: TransactionItem.tsx    From End-to-End-Web-Testing-with-Cypress with MIT License 6 votes vote down vote up
SmallAvatar = withStyles((theme: Theme) =>
  createStyles({
    root: {
      width: 22,
      height: 22,
      border: `2px solid ${theme.palette.background.paper}`,
    },
  })
)(Avatar)
Example #7
Source File: index.tsx    From frontend with Apache License 2.0 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) =>
  createStyles({
    listContainer: {
      height: "100%",
      overflow: "auto",
    },
    listItemSecondaryAction: {
      visibility: "hidden",
    },
    listItem: {
      "&:hover $listItemSecondaryAction": {
        visibility: "inherit",
      },
    },
  })
)
Example #8
Source File: index.tsx    From prism-frontend with MIT License 6 votes vote down vote up
styles = (theme: Theme) =>
  createStyles({
    drawerBackground: {
      backgroundColor: theme.palette.primary.main,
    },
    drawerContent: {
      padding: 16,
      width: '40vw',
    },
  })
Example #9
Source File: index.tsx    From dockerstats with Apache License 2.0 6 votes vote down vote up
styles = (theme: Theme) => ({
  container: {
    padding: '24px 24px 32px 24px',
    boxShadow: '0px 0px 64px rgba(34, 186, 251, 0.1)',
  },
  warning: {
    marginTop: theme.spacing(2),
    marginBottom: theme.spacing(2),
    padding: theme.spacing(2),
    backgroundColor: theme.palette.error.light,
    color: theme.palette.common.white,
  },
})
Example #10
Source File: AnalysisCard.tsx    From aqualink-app with MIT License 6 votes vote down vote up
styles = (theme: Theme) =>
  createStyles({
    autoWidth: {
      width: "auto",
    },
    AnalysisCardCard: {
      padding: theme.spacing(2),
      minHeight: 240,
      borderRadius: "0 4px 4px 0",
      backgroundColor: "#f8f9f9",
      margin: "14px 0",
      // add horizontal scroll on mobile
      overflowX: "auto",
    },
    rotatedText: {
      transform: "rotate(-90deg)",
    },
    // ensures wrapping never happens no matter the column amount.
    metricsWrapper: { minWidth: "max-content" },
    metricsTitle: {
      position: "relative",
      bottom: 7,
      left: -12,
      width: "auto",
    },
    lightFont: {
      fontWeight: 200,
    },
    values: {
      // ensures metric numbers aren't too close together on mobile
      margin: theme.spacing(0, 0.3),
    },

    extraPadding: {
      paddingLeft: theme.spacing(1),
    },
  })
Example #11
Source File: PlayerArena.tsx    From fishbowl with MIT License 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) =>
  createStyles({
    playerList: {
      minHeight: "200px",
      maxHeight: "300px",
      padding: "10px",
      overflow: "auto",
      "& > *": {
        margin: theme.spacing(0.5),
      },
    },
  })
)
Example #12
Source File: SearchPage.tsx    From backstage with Apache License 2.0 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) => ({
  bar: {
    padding: theme.spacing(1, 0),
  },
  filter: {
    '& + &': {
      marginTop: theme.spacing(2.5),
    },
  },
  filters: {
    padding: theme.spacing(2),
    marginTop: theme.spacing(2),
  },
}))