Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @react-md/icon

Index

Type aliases

ConfiguredIcons: Required<ConfigurableIcons>

Variables

FontIcon: ForwardRefExoticComponent<FontIconProps & RefAttributes<HTMLElement>> = ...

The FontIcon component is used for rendering a font-icon library's icon. The default is to use the material-icons library, but others can be used as well.

If you are using another font icon library that does not always create icons with a perfect 1:1 scale (such as font awesome), it is recommended to use the forceSize and forceFontSize props to fix the sizing issues.

IconRotator: ForwardRefExoticComponent<IconRotatorProps & RefAttributes<HTMLSpanElement>> = ...

The IconRotator is a simple component that is used to rotate an icon from a one degrees to another.

SVGIcon: ForwardRefExoticComponent<SVGIconProps & RefAttributes<SVGSVGElement>> = ...

The SVGIcon component is used to render inline SVG icons or SVG icons in a sprite map as an icon.

Functions

  • The IconProvider component is used to override all the default icons within react-md with a newly defined set of icons. This is super nice since you won't need to create new component wrappers for all the components within react-md if you want to switch to SVG icons instead of the default font icons.

    Parameters

    Returns ReactElement

  • Gets one of the configured icons from the IconProvider. This is probably just for use within react-md, but might be helpful outside if you want to reuse the existing icon configuration for other custom components.

    If te second argument is provided and it is not undefined, that value will be used instead of the inherited icon type.

    Parameters

    • name: keyof ConfigurableIcons

      The name of the icon you want to use.

    • Optional override: ReactNode

      An optional override to use instead of the inherited icon.

    Returns ReactNode

    The overridden icon value or the inherited icon.

Generated using TypeDoc