Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CartSystem

Cart system component class

  • is a section element
  • takes as props a cart object, checkout machine, scroll tracker, etc
  • contains CartButton and CartPanel components, mediates their relationship
  • handles cart button click event to toggle cart panel open or closed
  • handles cart system scroll tracking
  • ultimately performs the checkout, using the cart panel checkout callback and checkout machine as tools
  • takes a cart text object and distributes the text labels to child components

Hierarchy

Index

Constructors

constructor

  • Parameters

    Returns CartSystem

Properties

Optional base

base: HTMLElement

context

context: any

props

props: RenderableProps<CartSystemProps>

state

state: Readonly<any>

Static Optional defaultProps

defaultProps: any

Static Optional displayName

displayName: string

Methods

componentWillMount

  • componentWillMount(): void

componentWillUnmount

  • componentWillUnmount(): void

forceUpdate

  • forceUpdate(callback?: function): void
  • Parameters

    • Optional callback: function
        • (): void
        • Returns void

    Returns void

render

  • render(): Element

setState

  • setState<K>(state: Pick<any, K>, callback?: function): void
  • setState<K>(fn: function, callback?: function): void
  • Type parameters

    • K: keyof any

    Parameters

    • state: Pick<any, K>
    • Optional callback: function
        • (): void
        • Returns void

    Returns void

  • Type parameters

    • K: keyof any

    Parameters

    • fn: function
    • Optional callback: function
        • (): void
        • Returns void

    Returns void

Static Optional componentDidMount

  • componentDidMount(): void
  • Returns void

Static Optional componentDidUpdate

  • componentDidUpdate(previousProps: Readonly<CartSystemProps>, previousState: Readonly<any>, previousContext: any): void
  • Parameters

    • previousProps: Readonly<CartSystemProps>
    • previousState: Readonly<any>
    • previousContext: any

    Returns void

Static Optional componentWillMount

  • componentWillMount(): void
  • Returns void

Static Optional componentWillReceiveProps

  • componentWillReceiveProps(nextProps: Readonly<CartSystemProps>, nextContext: any): void
  • Parameters

    Returns void

Static Optional componentWillUnmount

  • componentWillUnmount(): void
  • Returns void

Static Optional componentWillUpdate

  • componentWillUpdate(nextProps: Readonly<CartSystemProps>, nextState: Readonly<any>, nextContext: any): void
  • Parameters

    • nextProps: Readonly<CartSystemProps>
    • nextState: Readonly<any>
    • nextContext: any

    Returns void

Static Optional getChildContext

  • getChildContext(): object
  • Returns object

Static Optional shouldComponentUpdate

  • shouldComponentUpdate(nextProps: Readonly<CartSystemProps>, nextState: Readonly<any>, nextContext: any): boolean
  • Parameters

    • nextProps: Readonly<CartSystemProps>
    • nextState: Readonly<any>
    • nextContext: any

    Returns boolean

Generated using TypeDoc