Home Reference Source
public class | source

Icon

Extends:

React.Component → Icon

A button control component that displays a button or a link.

Constructor Summary

Public Constructor
public

Binds this to custom class methods and creates a parent element ref.

Member Summary

Public Members
public

refSvg: React.Ref

The parent element ref.

Method Summary

Public Methods
public

animate(ref: *, path: *)

Resets the previous path animation and animates the new path.

public

componentDidUpdate(prevProps: *)

Determines when and what to animate to and from based on the hover and morph props.

public

render(): React.Component

Renders a React Component containing the icon svg and its paths.

Public Constructors

public constructor() source

Binds this to custom class methods and creates a parent element ref.

Public Members

public refSvg: React.Ref source

The parent element ref.

Public Methods

public animate(ref: *, path: *) source

Resets the previous path animation and animates the new path.

Params:

NameTypeAttributeDescription
ref *
path *

public componentDidUpdate(prevProps: *) source

Determines when and what to animate to and from based on the hover and morph props.

Params:

NameTypeAttributeDescription
prevProps *

Emit:

animate

public render(): React.Component source

Renders a React Component containing the icon svg and its paths.

Return:

React.Component