@material-ui/core/styles#Theme TypeScript Examples

The following examples show how to use @material-ui/core/styles#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: EditImageDialog.tsx    From vscode-crossnote with GNU Affero General Public License v3.0 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) =>
  createStyles({
    imageWrapper: {
      textAlign: "center",
    },
    imagePreview: {
      maxWidth: "100%",
      maxHeight: "400px",
    },
  })
)
Example #2
Source File: App.tsx    From Demae with MIT License 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) =>
	createStyles({
		box: {
			minHeight: "100vh",
			paddingBottom: "100px",
		},
		content: {
			flexGrow: 1
		}
	})
)
Example #3
Source File: Webhooks.tsx    From firetable with Apache License 2.0 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) =>
  createStyles({
    form: {
      display: "flex",
      flexDirection: "column",
      margin: "auto",
      width: "fit-content",
    },
    formControl: {
      marginTop: theme.spacing(2),
      minWidth: 120,
    },
    formControlLabel: {
      marginTop: theme.spacing(1),
    },
  })
)
Example #4
Source File: GeneralPanel.tsx    From abacus with GNU General Public License v2.0 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) =>
  createStyles({
    to: {
      marginLeft: theme.spacing(2),
      marginRight: theme.spacing(2),
      fontFamily: theme.custom.fonts.monospace,
      color: theme.palette.grey[600],
    },
    title: {
      flexGrow: 1,
    },
    row: {
      margin: theme.spacing(5, 0),
      display: 'flex',
      alignItems: 'center',
      '&:first-of-type': {
        marginTop: theme.spacing(3),
      },
    },
    datePicker: {
      '& input:invalid': {
        // Fix the native date-picker placeholder text colour
        color: theme.palette.text.hint,
      },
    },
    monospace: {
      fontFamily: theme.custom.fonts.monospace,
    },
  }),
)
Example #5
Source File: MainAppBar.tsx    From clarity with Apache License 2.0 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) =>
  createStyles({
    root: {
      flexGrow: 1,
      backgroundColor: 'white'
    },
    toolbarMargin: {
      minHeight: '40px'
    },
    menuButton: {
      marginRight: theme.spacing(2)
    },
    title: {
      flexGrow: 1
    }
  })
)
Example #6
Source File: MonitoringDialog.tsx    From Pi-Tool with GNU General Public License v3.0 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) =>
    createStyles({
        root: {
            width: '100%',
            minWidth: '500px',
            backgroundColor: theme.palette.background.paper,
        },
    }),
)
Example #7
Source File: ClientList.tsx    From react-tutorials with MIT License 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) =>
  createStyles({
    root: {
      width: '150px',
      maxWidth: 150,
      backgroundColor: theme.palette.background.paper,
      maxHeight: '340px',
      overflow: 'auto',
      paddingTop: '5px',
      scroll: 'paper',
    },
  })
)
Example #8
Source File: Drawer.tsx    From dashboard-layout with MIT License 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) => ({
  drawer: {
    background: "#D8DCD6",
    position: "static",
  },
  closed: {
    transition: theme.transitions.create("width", {
      easing: theme.transitions.easing.sharp,
      duration: theme.transitions.duration.leavingScreen,
    }),
    width: theme.spacing(7) + 1,
    overflowX: "hidden",
  },
  opened: {
    width: "240px",
    transition: theme.transitions.create("width", {
      easing: theme.transitions.easing.sharp,
      duration: theme.transitions.duration.enteringScreen,
    }),
  },
}))
Example #9
Source File: EnhancedTable.tsx    From tutorial-cloudflare-bookstore with Apache License 2.0 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) =>
  createStyles({
    root: {
      width: "100%",
      paddingRight: "10px",
      paddingLeft: "10px",
    },
    gridStyle: {
      padding: "10px",
    },
    button: {
      margin: "1px",
    },
    paper: {
      width: "100%",
      marginBottom: theme.spacing(2),
    },
    table: {
      minWidth: 750,
    },
    visuallyHidden: {
      border: 0,
      clip: "rect(0 0 0 0)",
      height: 1,
      margin: -1,
      overflow: "hidden",
      padding: 0,
      position: "absolute",
      top: 20,
      width: 1,
    },
  })
)
Example #10
Source File: App.tsx    From GitNotes with MIT License 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) =>
    createStyles({
        root: {
            display: 'flex',
        },
        drawer: {
            [theme.breakpoints.up('sm')]: {
                width: drawerWidth,
                flexShrink: 0,
            },
        },
        appBar: {
            [theme.breakpoints.up('sm')]: {
                width: `calc(100% - ${drawerWidth}px)`,
                marginLeft: drawerWidth,
            },
        },
        menuButton: {
            marginRight: theme.spacing(2),
            [theme.breakpoints.up('sm')]: {
                display: 'none',
            },
        },
        toolbar: theme.mixins.toolbar,
        drawerPaper: {
            width: drawerWidth,
        },
        content: {
            flexGrow: 1,
            padding: theme.spacing(3)
        },
        github: {
            '& > *': {
                marginRight: theme.spacing(2),
                marginBottom: theme.spacing(1),
            },
        }
    }),
)
Example #11
Source File: SQFormDialogInner.tsx    From SQForm with MIT License 6 votes vote down vote up
actionStyles = {
  root: {
    display: 'flex',
    justifyContent: 'space-between',
    flex: '1 1 100%',
    padding: '10px 20px',
    ...stickyStyles,
    bottom: 0,
    borderTop: ({palette}: Theme) => `1px solid ${palette.divider}`,
  },
}
Example #12
Source File: ZoomSpeedDial.tsx    From frontend with Apache License 2.0 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) =>
  createStyles({
    speedDial: {
      position: "absolute",
      "&.MuiSpeedDial-directionUp": {
        bottom: theme.spacing(2),
        right: theme.spacing(2),
      },
    },
  })
)
Example #13
Source File: style.ts    From react-app-architecture with Apache License 2.0 6 votes vote down vote up
useStyles = makeStyles(({}: Theme) => ({
  root: {
    flexGrow: 1,
    maxWidth: '1444px',
    margin: '0 auto',
    float: 'none',
  },
  content: {
    marginTop: 60,
    minHeight: '62vh',
  },
}))
Example #14
Source File: DownloadCSVDialog.tsx    From aqualink-app with MIT License 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) => ({
  dialogTitle: {
    backgroundColor: theme.palette.primary.main,
    overflowWrap: "break-word",
  },
  listWrapper: {
    display: "flex",
    flexDirection: "column",
  },
  listItem: {
    color: "#2f2f2f",
  },
  bold: {
    fontWeight: 700,
  },
}))
Example #15
Source File: Avatar.tsx    From backstage with Apache License 2.0 6 votes vote down vote up
useStyles = makeStyles(
  (theme: Theme) =>
    createStyles({
      avatar: {
        width: '4rem',
        height: '4rem',
        color: '#fff',
        fontWeight: theme.typography.fontWeightBold,
        letterSpacing: '1px',
        textTransform: 'uppercase',
      },
    }),
  { name: 'BackstageAvatar' },
)
Example #16
Source File: index.tsx    From ever-wallet-browser-extension with GNU General Public License v3.0 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) =>
    createStyles({
        root: {
            '& > * + *': {
                marginTop: theme.spacing(3),
            },
            'marginBottom': 12,
        },
    })
)
Example #17
Source File: MainAppBar.tsx    From signer with Apache License 2.0 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) =>
  createStyles({
    root: {
      width: '100vw',
      flexGrow: 1,
      color: '#c4c4c4',
      backgroundColor: 'var(--cspr-dark-blue)'
    },
    toolbarMargin: {
      minHeight: '40px'
    },
    menuButton: {
      marginRight: theme.spacing(2)
    },
    toggleWrapper: {
      flexGrow: 1,
      textAlign: 'center'
    },
    toggleButton: {
      width: '100%',
      height: '2rem'
    }
  })
)
Example #18
Source File: LanguageKeySelect.tsx    From clearflask with Apache License 2.0 6 votes vote down vote up
styles = (theme: Theme) => createStyles({
  labelMessage: {
    margin: theme.spacing(1, 2),
  },
  labelOptionContainer: {
    display: 'flex',
    alignItems: 'center',
    margin: theme.spacing(1, 2),
    cursor: 'pointer',
  },
  table: {
    whiteSpace: 'nowrap',
    ...contentScrollApplyStyles({
      theme,
      orientation: Orientation.Horizontal,
      backgroundColor: theme.palette.background.paper,
    }),
  },
})