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

The following examples show how to use @material-ui/core/styles#makeStyles. 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: movie.tsx    From 0Auth with MIT License 6 votes vote down vote up
useStyles = makeStyles({
  root: {
    display: 'inline-block',
    margin: 'auto .3rem',
    width: 275,
    textAlign: 'left'
  },
  bullet: {
    display: 'inline-block',
    margin: '0 2px',
    transform: 'scale(0.8)',
  },
  title: {
    fontSize: 17,
    color: 'black'
  },
  pos: {
    fontSize: 12,
    marginBottom: 12,
  },
})
Example #2
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 #3
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 #4
Source File: NavDrawer.tsx    From akashlytics with GNU General Public License v3.0 6 votes vote down vote up
useStyles = makeStyles((theme) => ({
  list: {
    width: 250
  },
  listSubHeader: {
    display: "flex",
    paddingTop: 15,
    paddingBottom: 15,
    alignItem: "center"
  },
  listSubHeaderLogo: {
    height: "4rem"
  },
  listSubHeaderTitle: {
    fontWeight: "bold"
  }
}))
Example #5
Source File: Tooltip.tsx    From anchor-web-app with Apache License 2.0 6 votes vote down vote up
useTooltipStyle = makeStyles<NeumorphismTheme, TooltipProps>(
  (theme) => ({
    tooltip: ({ color = 'normal' }) => ({
      position: 'relative',
      borderRadius: 3,
      color: theme.tooltip[color].textColor,
      backgroundColor: theme.tooltip[color].backgroundColor,
      fontSize: '0.9em',
      fontWeight: 400,
      padding: '10px 15px',
      boxShadow: '1px 1px 6px 0px rgba(0,0,0,0.2)',
    }),
    arrow: ({ color = 'normal' }) => ({
      color: theme.tooltip[color].backgroundColor,
    }),
  }),
)
Example #6
Source File: CodeEditor.tsx    From firetable with Apache License 2.0 6 votes vote down vote up
useStyles = makeStyles((theme) =>
  createStyles({
    editorWrapper: { position: "relative" },
    resizeIcon: {
      position: "absolute",
      bottom: 0,
      right: 0,
      color: theme.palette.text.disabled,
    },
    saveButton: {
      marginTop: theme.spacing(1),
    },
  })
)
Example #7
Source File: inPageNav.tsx    From mano-aloe with MIT License 6 votes vote down vote up
useStyles = makeStyles((theme) => ({
  containedPrimary: {
    color: "#ffffff",
    backgroundColor: "#724683",
    '&:hover': {
      backgroundColor: "#fd418d",
    },
  },
}))
Example #8
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 #9
Source File: ResetPasswordAction.tsx    From firebase-react-typescript-project-template with MIT License 6 votes vote down vote up
useStyles = makeStyles((theme: Theme) =>
  createStyles({
    loading: {
      display: "flex",
      justifyContent: "center",
    },
    link: {
      textDecoration: "none",
      margin: "0 auto",
    },
    marginTop: {
      marginTop: theme.spacing(3),
    },
    textSpacing: {
      marginBottom: theme.spacing(2),
    },
    form: {
      display: "flex",
      flexDirection: "column",
      alignItems: "center",
      marginTop: theme.spacing(4),
    },
    input: {
      marginBottom: theme.spacing(2),
      marginTop: 0,
      width: "100%",
      maxWidth: 280,
    },
  })
)
Example #10
Source File: ImageAvatar.tsx    From binaural-meet with GNU General Public License v3.0 6 votes vote down vote up
useStyles = makeStyles({
  imageAvatar: (props: ImageAvatarProps) => {
    const style = avatarCommon(props)
    Object.assign(style, {textAlign:'right' as Property.TextAlign,
      verticalAlign: 'top' as Property.VerticalAlign})
    if (props.border){ addBoarder(style, props) }

    return style
  },
  textAvatar: (props: ImageAvatarProps) => {
    const style = avatarCommon(props)
    if (props.border){ addBoarder(style, props) }

    return style
  }
})
Example #11
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 #12
Source File: MainCard.tsx    From Pi-Tool with GNU General Public License v3.0 6 votes vote down vote up
useStyles = makeStyles({
    title: {
        textTransform: 'uppercase',
        padding: '10px 15px 0 15px',
        fontSize: 24
    },
    card: {
        marginBottom: 12,
        '&:first-of-type': {
            marginTop: 12
        }

    },
    cardHeader: {
        marginBottom: 10
    }
})
Example #13
Source File: ArticleListItem.tsx    From react-tutorials with MIT License 6 votes vote down vote up
useStyles = makeStyles((theme) => ({
  root: {
    width: '100%',
    maxWidth: '150ch',
    backgroundColor: theme.palette.background.paper,
  },
  inline: {
    display: 'inline',
  },
}))
Example #14
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 #15
Source File: mobile-drawer.tsx    From lobis-frontend with MIT License 6 votes vote down vote up
useStyles = makeStyles(theme => ({
    drawer: {
        [theme.breakpoints.up("md")]: {
            width: DRAWER_WIDTH,
            flexShrink: 0,
        },
    },
    drawerPaper: {
        width: DRAWER_WIDTH,
        borderRight: 0,
    },
}))
Example #16
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 #17
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 #18
Source File: BankAccountForm.tsx    From End-to-End-Web-Testing-with-Cypress with MIT License 6 votes vote down vote up
useStyles = makeStyles((theme) => ({
  paper: {
    marginTop: theme.spacing(8),
    display: "flex",
    flexDirection: "column",
    alignItems: "center",
  },
  form: {
    width: "100%", // Fix IE 11 issue.
    marginTop: theme.spacing(1),
  },
  submit: {
    margin: theme.spacing(3, 0, 2),
  },
}))