@material-ui/core#BoxProps TypeScript Examples

The following examples show how to use @material-ui/core#BoxProps. 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: Blockie.tsx    From homebase-app with MIT License 6 votes vote down vote up
Blockie = ({
  address,
  size,
  ...props
}: BoxProps & { address: string; size?: number }) => {
  return (
    <StyledBox
      address={getBlockie(address.toLowerCase())}
      size={size}
      {...props}
    />
  );
}
Example #2
Source File: LinkedData.tsx    From ra-enterprise-demo with MIT License 6 votes vote down vote up
LinkedData = ({
    children,
    label,
    icon,
    to,
    ...rest
}: {
    children: ReactNode;
    label: ReactNode;
    icon: ReactNode;
    to: any;
} & BoxProps): ReactElement => {
    const classes = useStyles();
    return (
        <Link component={RouterLink} to={to} className={classes.link}>
            <Box
                component="li"
                display="flex"
                alignItems="center"
                justifyContent="center"
                flexDirection="column"
                className={classes.root}
                {...rest}
            >
                <Box display="flex" alignItems="center">
                    <Box marginRight={1}>{icon}</Box>
                    <Typography component="span">{children}</Typography>
                </Box>
                <Typography variant="caption">{label}</Typography>
            </Box>
        </Link>
    );
}