react-feather#Icon TypeScript Examples

The following examples show how to use react-feather#Icon. 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: IconButton.tsx    From yet-another-generic-startpage with MIT License 6 votes vote down vote up
IconButton = ({
  label,
  onClick,
  icon: Icon,
  disabled,
}: IconButtonProps) => (
  <Button
    onClick={click => {
      onClick?.()
      click.stopPropagation()
    }}
    onKeyDown={key => key.stopPropagation()}
    title={label}
    disabled={disabled}
  >
    <Icon aria-hidden />
    {label ? <VisuallyHidden>{label}</VisuallyHidden> : null}
  </Button>
)
Example #2
Source File: MessagesBlock.tsx    From ke with MIT License 5 votes vote down vote up
messageIconMapping: { [key: string]: Icon } = {
  success: CheckCircle,
  warning: AlertCircle,
  error: AlertCircle,
  info: HelpCircle,
}