Skip to content

Augmentedjs/presentation-components

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

presentation-components

Augmented.js Presentation Simple Components Module

API

Table of Contents

Article

Extends DecoratorView

An article class for setting up a 'page'
Supported options are:

  • name - The name of the article view
  • el - The mount point
  • style - The style class
  • header - The header markup
  • headerEl - The header mount point
  • footer - The footer markup
  • footerEl - The footer mount point
  • body - The body markup
  • bodyEl - The body mount point (will generate a div)
  • sections - array of sections to prefill (see addSection API for format)

Parameters

  • options object Options to pass to the constructor

Examples

const article = new Presentation.Component.Article(
                { "el": "#mount", "header": "html", "footerEl": "#foot" });

header

Header property

Parameters

  • header

Properties

footer

Footer for the article

Parameters

  • footer

Properties

body

The body content of the card (supports HTML)

Parameters

  • body

Properties

sections

The section array

Parameters

  • sections

Properties

addSection

Add a section object to the article

Parameters

  • section object a section object

Examples

Section Object format:
{
  "id" "something",
  "body" "html",
  "class" "something"
}

clearSections

Clear the sections

render

render - render the article

Card

Extends DecoratorView

A card view - simple panel/dialog-like panel

Parameters

  • options

style

body property - the body of the card

Parameters

  • style

style

style property - the style

Parameters

  • style

body

The body content of the card (supports HTML)

Parameters

  • body

render

render - render the card

remove

remove

Footer

Extends DecoratorView

A Footer Component

Parameters

  • options

body

The body content of the card (supports HTML)

Parameters

  • body

render

render - render the footer

Header

Extends DecoratorView

A Header Component

Parameters

  • options

title

Parameters

  • title

Properties

  • title string A title property

subTitle

Parameters

  • subTitle

Properties

  • subTitle string A subTitle property

render

render - render the header

remove

Remove the Header

Returns object Returns the view context ('this')

Manager

Extends Mediator

A Component Manager or Mediator

Parameters

  • options

Meta

  • deprecated: Use Mediator

manageComponent

Manages a component (colleague)

Parameters

  • component View A component or view to manage

unmanageComponent

Unmanages a component (colleague)

Parameters

  • component View A component or view to manage

SelectBox

Extends DecoratorView

A SelectBox

Parameters

  • options (optional, default {})

render

Render the SelectBox

Returns object Returns the view context ('this')

remove

remove

addOption

Adds an option to the select

Parameters

  • label string label of the option
  • value string value of the option
  • selected boolean selected or not

Examples

addOption({"dog", 0, true});

About

Augmented.js Presentation Simple Components Module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published