2.5.4 • Published 8 years ago

ember-frost-modal-dialog v2.5.4

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

Travis Coveralls NPM

ember-frost-modal-dialog

A modal dialog for messages requiring some user feedback. This is a wrapper around ember-frost-modal that provides the base styles and block structure

Installation

ember install ember-frost-modal-dialog

API

AttributeTypeValueDescription
modalNamestring<name>Mandatory unique name for the modal, accessible via ember-remodal service
typestringconfirmationwill display a confirmation dialog
informationwill display an information dialog
warningwill display a warning dialog
errorwill display an error dialog
titlestring<title>Optional title for your dialog
confirmAliasstring<alias>Optional string alias for the primary action button in a modal
onCloseFunction<action-name>Optional callback for when modal is closed
onConfirmHandlerFunction<action-name>If confirmAlias is present, callback for when the confirm button is clicked
onOpenFunction<action-name>Optional callback for when modal is opened

Examples

Template

Block-slot target yields the component used to launch the modal, e.g. a button Optional Block-slot header yields a custom title template if title attr was not provided Block-slot body yields the dialog content A Cancel button is always rendered to allow the modal to be closed.

{{#frost-modal-dialog
  modalName='my-dialog'
  title='confirmation'
  type='confirmation'
  confirmAlias='Confirm'
  onConfirmHandler=(action 'confirmHandler')}}
  {{#block-slot slot 'target'}}
    {{frost-button
      priority="primary"
      size="medium"
      text='Confirmation dialog'
    }}
  {{/block-slot}}
  {{#block-slot slot 'body'}}
    Test
  {{/block-slot}}
{{/frost-modal-dialog}}

Controller

actions: {
  confirmHandler: function () {

  }
}

Development

Setup

git clone git@github.com:ciena-frost/ember-frost-modal-dialog.git
cd ember-frost-modal-dialog
npm install && bower install

Development Server

A dummy application for development is available under ember-frost-modal-dialog/tests/dummy. To run the server run ember server (or npm start) from the root of the repository and visit the app at http://localhost:4200.

Testing

Run npm test from the root of the project to run linting checks as well as execute the test suite and output code coverage.

2.5.4

8 years ago

2.5.3

8 years ago

2.5.2

8 years ago

2.5.1

8 years ago

2.5.0

8 years ago

2.4.0

8 years ago

2.3.0

8 years ago

2.2.1

8 years ago

2.2.0

8 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.0

8 years ago

1.0.0

8 years ago