Home Reference Source
public class | source

Button

Extends:

React.Component → Button

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

Constructor Summary

Public Constructor
public

Creates a local state and binds this to custom class methods.

Member Summary

Public Members
public

The internal component state.

Method Summary

Public Methods
public

onMouseOut(e: *)

Triggers the onMouseOut function passed from props and sets the internal hover state to false.

public

onMouseOver(e: *)

Triggers the onMouseOver function passed from props and sets the internal hover state to true.

public

render(): React.Fragment

Renders a React Fragment containing the button or link and its styles.

Public Constructors

public constructor() source

Creates a local state and binds this to custom class methods.

Public Members

public state: Object source

The internal component state.

Properties:

NameTypeAttributeDescription
hover boolean
  • default: false

Whether or not the button is being hovered over.

Public Methods

public onMouseOut(e: *) source

Triggers the onMouseOut function passed from props and sets the internal hover state to false.

Params:

NameTypeAttributeDescription
e *

public onMouseOver(e: *) source

Triggers the onMouseOver function passed from props and sets the internal hover state to true.

Params:

NameTypeAttributeDescription
e *

public render(): React.Fragment source

Renders a React Fragment containing the button or link and its styles.

Return:

React.Fragment