@material-ui/core#GridProps TypeScript Examples

The following examples show how to use @material-ui/core#GridProps. 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: EntityGridItem.tsx    From backstage with Apache License 2.0 6 votes vote down vote up
EntityGridItem = (
  props: Omit<GridProps, 'item' | 'container'> & { entity: Entity },
): JSX.Element => {
  const { entity, classes, ...rest } = props;
  const itemClasses = useStyles({ entity });

  return (
    <EntityProvider entity={entity}>
      <Grid classes={{ root: itemClasses.root, ...classes }} {...rest} item />
    </EntityProvider>
  );
}
Example #2
Source File: ProposalTableRowStatusBadge.tsx    From homebase-app with MIT License 6 votes vote down vote up
TableStatusBadge: React.FC<
  { status: ProposalStatus } & GridProps
> = ({ status, ...props }) => (
  <Badge status={status} {...props}>
    <Grid container alignItems="center" justify="center">
      <Grid item>
        <Typography> {status.toUpperCase()} </Typography>
      </Grid>
    </Grid>
  </Badge>
)
Example #3
Source File: SQFormScrollableCard.stories.tsx    From SQForm with MIT License 5 votes vote down vote up
alignItems: GridProps['alignItems'] = 'center'
Example #4
Source File: SQFormScrollableCard.stories.tsx    From SQForm with MIT License 5 votes vote down vote up
spacing: GridProps['spacing'] = 2
Example #5
Source File: Hero.tsx    From homebase-app with MIT License 5 votes vote down vote up
Hero: React.FC<GridProps> = ({ children, ...props }) => {
  return (<Container item {...props}>
    <Grid container justifyContent="space-between" alignItems="center">
      {children}
    </Grid>
  </Container>)
}
Example #6
Source File: StatusBadge.tsx    From homebase-app with MIT License 5 votes vote down vote up
StatusBadge: React.FC<{ status: ProposalStatus } & GridProps> = ({
  status,
  ...props
}) => (
  <Badge status={status} {...props}>
    <Typography color="inherit"> {statusColors(status).text} </Typography>
  </Badge>
)