@material-ui/core#SvgIconTypeMap TypeScript Examples

The following examples show how to use @material-ui/core#SvgIconTypeMap. 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: Competitors.tsx    From clearflask with Apache License 2.0 6 votes vote down vote up
TableOfContentsAnchors: Array<{ id: string, title: string, icon: OverridableComponent<SvgIconTypeMap> }> = [
  { id: 'Users', title: 'Users', icon: PeopleIcon },
  { id: 'Pricing', title: 'Pricing', icon: PaymentIcon },
  { id: 'Features', title: 'Features', icon: FeaturesIcon },
  { id: 'Design', title: 'Design', icon: DesignIcon },
  { id: 'Import_Export', title: 'Import/Export', icon: ImportExportIcon },
  { id: 'Customize', title: 'Customize', icon: CustomizeIcon },
  { id: 'Prioritization', title: 'Prioritization', icon: AnalyzeIcon },
  { id: 'Onboarding', title: 'Onboarding', icon: SpeakIcon },
  { id: 'Website_health', title: 'Health', icon: SpeedIcon },
  { id: 'Languages', title: 'Languages', icon: TranslateIcon },
  { id: 'Integrations', title: 'Integrations', icon: IntegrationsIcon },
  { id: 'Alternatives', title: 'Alternatives', icon: AlternativesIcon },
]
Example #2
Source File: Competitors.tsx    From clearflask with Apache License 2.0 6 votes vote down vote up
FilterIconButton = (props: {
  icon?: OverridableComponent<SvgIconTypeMap>;
  iconClassName?: string;
  select: boolean;
  platformIds: Set<string>;
  invertSelection?: boolean;
}) => {
  const Icon = props.icon || FilterIcon;
  return (
    <FilterButtonBase
      select={props.select}
      platformIds={props.platformIds}
      invertSelection={props.invertSelection}
      renderButton={(onClick, disabled) => (
        <Tooltip title='Only show these platforms' placement='top'>
          <IconButton
            disabled={disabled}
            color='inherit'
            onClick={onClick}
          >
            <Icon
              className={props.iconClassName}
              fontSize='small'
              color='inherit'
            />
          </IconButton>
        </Tooltip>
      )}
    />
  );
}
Example #3
Source File: Dashboard.tsx    From clearflask with Apache License 2.0 6 votes vote down vote up
renderPreviewPost(postId: string, stateKey: keyof State, project: AdminProject, headerTitle?: string, headerIcon?: OverridableComponent<SvgIconTypeMap>): Section {
    return {
      name: 'preview',
      breakAction: 'drawer',
      size: PostPreviewSize,
      ...(headerTitle ? {
        header: { title: { title: headerTitle, icon: headerIcon } },
      } : {}),
      content: (
        <Provider key={project.projectId} store={project.server.getStore()}>
          <Fade key={postId} in appear>
            <div>
              <DashboardPost
                key={postId}
                server={project.server}
                postId={postId}
                onClickPost={postId => this.pageClicked('post', [postId])}
                onUserClick={userId => this.pageClicked('user', [userId])}
                onDeleted={() => this.setState({ [stateKey]: undefined } as any)}
              />
            </div>
          </Fade>
        </Provider>
      ),
    };
  }
Example #4
Source File: CreatePage.tsx    From clearflask with Apache License 2.0 5 votes vote down vote up
TemplateCard = (props: {
  icon?: OverridableComponent<SvgIconTypeMap>,
  className?: string;
  title: string;
  content: string | React.ReactNode;
  disabled?: boolean;
  onClick: () => void;
}) => {
  const classes = useStyles();
  const Icon = props.icon;
  return (
    <HoverArea>
      {(hoverAreaProps, isHovering, isHoverDisabled) => (
        <Card {...hoverAreaProps} elevation={0} className={classNames(
          props.className,
          classes.box,
          isHovering && classes.boxSelected,
          props.disabled && classes.disabled,
        )}>
          <CardActionArea
            onClick={props.onClick}
            disabled={props.disabled}
            className={classNames(classes.flexGrow)}
          >
            {!!Icon && (
              <Icon fontSize='inherit' color='inherit' className={classNames(
                classes.cardIcon,
                isHovering && classes.cardIconSelected,
              )} />
            )}
            <CardHeader
              title={props.title}
              titleTypographyProps={{ align: 'center' }}
              subheaderTypographyProps={{ align: 'center' }}
            />
            {!!props.content && (
              <CardContent>{props.content}</CardContent>
            )}
          </CardActionArea>
        </Card>
      )}
    </HoverArea>
  );
}